Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 2008 17:59:57 -0800 (PST)
From:      Matt Peterson <matt@peterson.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/121376: New port: sysutils/sortu
Message-ID:  <200803050159.m251xv5N023389@tosca.peterson.org>
Resent-Message-ID: <200803050220.m252K3Y5016199@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         121376
>Category:       ports
>Synopsis:       New port: sysutils/sortu
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 05 02:20:03 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Matt Peterson <matt@peterson.org>
>Release:        FreeBSD 6.3-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD tosca.peterson.org 6.3-PRERELEASE FreeBSD 6.3-PRERELEASE #5: Tue Oct 30 03:34:42 PDT 2007 root@tosca.peterson.org:/usr/obj/usr/src/sys/GENERIC i386

>Description:

A new port for a utiltiy that combinds sort + uniq with some added
features, such as outputing as results as percentages.

>How-To-Repeat:
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	sortu
#	sortu/Makefile
#	sortu/distinfo
#	sortu/pkg-descr
#	sortu/pkg-plist
#
echo c - sortu
mkdir -p sortu > /dev/null 2>&1
echo x - sortu/Makefile
sed 's/^X//' >sortu/Makefile << 'END-of-sortu/Makefile'
X# New ports collection makefile for:	sortu
X# Date created:		Tue Mar  4 17:36:48 PST 2008
X# Whom:			Matt Peterson <matt@peterson.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	sortu
XPORTVERSION=	2.0.0
XCATEGORIES=	sysutils
XMASTER_SITES=	http://256.com/sources/sortu/ \
X		http://matt.peterson.org/FreeBSD/ports/
XEXTRACT_SUFX=   .tgz
X
XMAINTAINER=	matt@peterson.org
XCOMMENT=	Tool that combinds sort and uniq functionality
X
XALL_TARGET=	sortu
X
X.include <bsd.port.pre.mk>
X
Xdo-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/sortu ${PREFIX}/bin
X
Xpost-install:
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${DOCSDIR}
X	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
X.endif
X
X.include <bsd.port.post.mk>
END-of-sortu/Makefile
echo x - sortu/distinfo
sed 's/^X//' >sortu/distinfo << 'END-of-sortu/distinfo'
XMD5 (sortu-2.0.0.tgz) = 28ebf2fb1000262f6a0967d022e7c32f
XSHA256 (sortu-2.0.0.tgz) = d3e4845fc60738fe3bf7b311482a321273f94e3dc6cba72e50f28e46b9511a2c
XSIZE (sortu-2.0.0.tgz) = 56783
END-of-sortu/distinfo
echo x - sortu/pkg-descr
sed 's/^X//' >sortu/pkg-descr << 'END-of-sortu/pkg-descr'
XThe sortu program is a replacement for the sort and uniq programs. It is
Xcommon for Unix script writers to want to count how many separate patterns
Xare in a file.  For example, if you have a list of addresses, you may want
Xto see how many are from each state. So you cut out the state part, sort
Xthese, and then pass them through uniq -c. Sortu does all this for you in a
Xfraction of the time.
X
XSortu uses a hash table and some decent line processing to provide this
Xfunctionality.  For a relatively small number of keys, it can be signifcantly
Xsmaller than using sort, because it does not have to keep temporary files.
XIf you are dealing with a large number of unique keys then sortu will run out
Xof memory and stop. Sortu has some basic field and delimiter handling which
Xshould do most basic awk or cut features to separate out the field that you
Xare sorting on.
X
XWWW: http://256.com/sources/sortu/
END-of-sortu/pkg-descr
echo x - sortu/pkg-plist
sed 's/^X//' >sortu/pkg-plist << 'END-of-sortu/pkg-plist'
Xbin/sortu
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%@dirrm %%DOCSDIR%%
END-of-sortu/pkg-plist
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803050159.m251xv5N023389>