mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-29 01:13:08 +00:00
2a51f06664
common for Unix script writers to want to count how many separate patterns are in a file. For example, if you have a list of addresses, you may want to see how many are from each state. So you cut out the state part, sort these, and then pass them through uniq -c. Sortu does all this for you in a fraction of the time. Sortu uses a hash table and some decent line processing to provide this functionality. For a relatively small number of keys, it can be signifcantly smaller than using sort, because it does not have to keep temporary files. If you are dealing with a large number of unique keys then sortu will run out of memory and stop. Sortu has some basic field and delimiter handling which should do most basic awk or cut features to separate out the field that you are sorting on. WWW: http://256.com/sources/sortu/ PR: ports/121376 Submitted by: Matt Peterson <matt at peterson.org> Approved by: tabthorpe (mentor)
32 lines
652 B
Makefile
32 lines
652 B
Makefile
# New ports collection makefile for: sortu
|
|
# Date created: Wed Mar 12 18:13:34 PDT 2008
|
|
# Whom: Matt Peterson <matt@peterson.org>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= sortu
|
|
PORTVERSION= 2.1.0
|
|
CATEGORIES= sysutils
|
|
MASTER_SITES= http://256.com/sources/sortu/ \
|
|
http://matt.peterson.org/FreeBSD/ports/
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
MAINTAINER= matt@peterson.org
|
|
COMMENT= Tool that combines sort and uniq functionality
|
|
|
|
ALL_TARGET= sortu
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
do-install:
|
|
${INSTALL_PROGRAM} ${WRKSRC}/sortu ${PREFIX}/bin
|
|
|
|
post-install:
|
|
.if !defined(NOPORTDOCS)
|
|
${MKDIR} ${DOCSDIR}
|
|
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|