The FreeBSD Ports Archive

Freebsd | Contact
Welcome to FreeBSD Software


FreeBSD textproc : agrep

Approximate grep (fast approximate pattern-matching tool)

 Agrep is a tool for fast text searching allowing errors.

The three most significant features of agrep that are not supported by
the grep family are 
1) the ability to search for approximate patterns;
    for example, "agrep -2 homogenos foo" will find homogeneous as well 
    as any other word that can be obtained from homogenos with at most 
    2 substitutions, insertions, or deletions.
    "agrep -B homogenos foo" will generate a message of the form
    best match has 2 errors, there are 5 matches, output them? (y/n)
2) agrep is record oriented rather than just line oriented;  a record
    is by default a line, but it can be user defined;
    for example, "agrep -d '^From ' 'pizza' mbox"
    outputs all mail messages that contain the keyword "pizza".
    Another example:  "agrep -d '$$' pattern foo" will output all
    paragraphs (separated by an empty line) that contain pattern.
3) multiple patterns with AND (or OR) logic queries.   
    For example, "agrep -d '^From ' 'burger,pizza' mbox" 
    outputs all mail messages containing at least one of the 
    two keywords (, stands for OR).
    "agrep -d '^From ' 'good;pizza' mbox" outputs all mail messages
    containing both keywords.

Putting these options together one can ask queries like

agrep -d '$$' -2 ';TheAuthor;Curriculum;<198[5-9]>' bib

which outputs all paragraphs referencing articles in CACM between 
1985 and 1989 by TheAuthor dealing with curriculum.  
Two errors are allowed, but they cannot be in either CACM or the year 
(the <> brackets forbid errors in the pattern between them).  

Two technical papers describing agrep are available as:

	agrep.ps.1 is a technical report from June 1991 describing the
	design and implementation of agrep
		ftp://ftp.cs.arizona.edu/agrep/agrep.ps.1.Z

	agrep.ps.2 is a copy of the paper as appeared in the 1992 Winter
	USENIX conference.
		ftp://ftp.cs.arizona.edu/agrep/agrep.ps.2.Z


- David O'Brien
obrien@NUXI.com
 

ftp://ftp.cs.arizona.edu/agrep/



agrep history


v. 1.15
date: 2003/11/20 19:22:15;  author: dinoex;  state: Exp;  lines: +1 -1
- take maintainership
- use DOCSDIR

v. 1.14 date: 2003/06/27 04:05:34; author: kris; state: Exp; lines: +1 -0 Fix missing format string argument and bump PORTREVISION. Obtained from: OpenBSD
v. 1.13 date: 2003/02/20 19:11:18; author: knu; state: Exp; lines: +1 -0 De-pkg-comment.
v. 1.12 date: 2002/11/10 16:48:06; author: lioux; state: Exp; lines: +0 -2 o Rollback PORTCOMMENT modifications while this feature's implementation is better studied o Turn PORTCOMMENT variable in Makefile back into pkg-comment files Approved by: kris (portmgr hat), portmgr, re (silence)
v. 1.11 date: 2002/11/06 22:47:02; author: adamw; state: Exp; lines: +2 -0 Use PORTCOMMENT in the Makefile, and whack the pkg-comment. Approved by: pat
v. 1.10 date: 2002/07/21 01:56:55; author: naddy; state: Exp; lines: +2 -0 * Honor CFLAGS. * Include proper prototypes; fixes dire warnings on alpha.
v. 1.9 date: 2002/05/08 20:58:31; author: obrien; state: Exp; lines: +2 -2 To ports@freebsd.org.
v. 1.8 date: 2001/02/05 16:34:26; author: olgeni; state: Exp; lines: +2 -2 More style fixes for ports/textproc.
v. 1.7 date: 2000/04/15 01:52:28; author: asami; state: Exp; lines: +2 -2 Revert version back from 2.0.4 to 2.04, I can't find any evidence supporting the change.
v. 1.6 date: 2000/04/09 21:52:07; author: cpiazza; state: Exp; lines: +3 -3 Update with the new PORTNAME/PORTVERSION variables
v. 1.5 date: 2000/03/22 00:26:31; author: obrien; state: Exp; lines: +2 -1 Restore useless version required comments.
v. 1.4 date: 2000/03/20 02:36:02; author: obrien; state: Exp; lines: +1 -2 Remove the "version required" line.
v. 1.3 date: 2000/02/13 03:23:00; author: obrien; state: Exp; lines: +3 -3 Style nits in the ports I maintain.
v. 1.2 date: 1999/08/31 02:08:56; author: peter; state: Exp; lines: +1 -1 $Id$ -> $FreeBSD$
v. 1.1 date: 1997/05/25 03:42:42; author: obrien; state: Exp; branches: 1.1.1; Initial revision
v. 1.1.1.1 date: 1997/05/25 03:42:42; author: obrien; state: Exp; lines: +0 -0 agrep is a tool for fast text searching allowing errors. The three most significant features of agrep that are not supported by the grep family are 1) the ability to search for approximate patterns 2) agrep is record oriented rather than just line oriented 3) multiple patterns with AND (or OR) logic queries ============================================================================= v. 1.15 date: 2003/11/20 19:22:15; author: dinoex; state: Exp; lines: +1 -1 - take maintainership - use DOCSDIR
v. 1.14 date: 2003/06/27 04:05:34; author: kris; state: Exp; lines: +1 -0 Fix missing format string argument and bump PORTREVISION. Obtained from: OpenBSD
v. 1.13 date: 2003/02/20 19:11:18; author: knu; state: Exp; lines: +1 -0 De-pkg-comment.
v. 1.12 date: 2002/11/10 16:48:06; author: lioux; state: Exp; lines: +0 -2 o Rollback PORTCOMMENT modifications while this feature's implementation is better studied o Turn PORTCOMMENT variable in Makefile back into pkg-comment files Approved by: kris (portmgr hat), portmgr, re (silence)
v. 1.11 date: 2002/11/06 22:47:02; author: adamw; state: Exp; lines: +2 -0 Use PORTCOMMENT in the Makefile, and whack the pkg-comment. Approved by: pat
v. 1.10 date: 2002/07/21 01:56:55; author: naddy; state: Exp; lines: +2 -0 * Honor CFLAGS. * Include proper prototypes; fixes dire warnings on alpha.
v. 1.9 date: 2002/05/08 20:58:31; author: obrien; state: Exp; lines: +2 -2 To ports@freebsd.org.
v. 1.8 date: 2001/02/05 16:34:26; author: olgeni; state: Exp; lines: +2 -2 More style fixes for ports/textproc.
v. 1.7 date: 2000/04/15 01:52:28; author: asami; state: Exp; lines: +2 -2 Revert version back from 2.0.4 to 2.04, I can't find any evidence supporting the change.
v. 1.6 date: 2000/04/09 21:52:07; author: cpiazza; state: Exp; lines: +3 -3 Update with the new PORTNAME/PORTVERSION variables
v. 1.5 date: 2000/03/22 00:26:31; author: obrien; state: Exp; lines: +2 -1 Restore useless version required comments.
v. 1.4 date: 2000/03/20 02:36:02; author: obrien; state: Exp; lines: +1 -2 Remove the "version required" line.
v. 1.3 date: 2000/02/13 03:23:00; author: obrien; state: Exp; lines: +3 -3 Style nits in the ports I maintain.
v. 1.2 date: 1999/08/31 02:08:56; author: peter; state: Exp; lines: +1 -1 $Id$ -> $FreeBSD$
v. 1.1 date: 1997/05/25 03:42:42; author: obrien; state: Exp; branches: 1.1.1; Initial revision
v. 1.1.1.1 date: 1997/05/25 03:42:42; author: obrien; state: Exp; lines: +0 -0 agrep is a tool for fast text searching allowing errors. The three most significant features of agrep that are not supported by the grep family are 1) the ability to search for approximate patterns 2) agrep is record oriented rather than just line oriented 3) multiple patterns with AND (or OR) logic queries ============================================================================= v. 1.15 date: 2003/11/20 19:22:15; author: dinoex; state: Exp; lines: +1 -1 - take maintainership - use DOCSDIR
v. 1.14 date: 2003/06/27 04:05:34; author: kris; state: Exp; lines: +1 -0 Fix missing format string argument and bump PORTREVISION. Obtained from: OpenBSD
v. 1.13 date: 2003/02/20 19:11:18; author: knu; state: Exp; lines: +1 -0 De-pkg-comment.
v. 1.12 date: 2002/11/10 16:48:06; author: lioux; state: Exp; lines: +0 -2 o Rollback PORTCOMMENT modifications while this feature's implementation is better studied o Turn PORTCOMMENT variable in Makefile back into pkg-comment files Approved by: kris (portmgr hat), portmgr, re (silence)
v. 1.11 date: 2002/11/06 22:47:02; author: adamw; state: Exp; lines: +2 -0 Use PORTCOMMENT in the Makefile, and whack the pkg-comment. Approved by: pat
v. 1.10 date: 2002/07/21 01:56:55; author: naddy; state: Exp; lines: +2 -0 * Honor CFLAGS. * Include proper prototypes; fixes dire warnings on alpha.
v. 1.9 date: 2002/05/08 20:58:31; author: obrien; state: Exp; lines: +2 -2 To ports@freebsd.org.
v. 1.8 date: 2001/02/05 16:34:26; author: olgeni; state: Exp; lines: +2 -2 More style fixes for ports/textproc.
v. 1.7 date: 2000/04/15 01:52:28; author: asami; state: Exp; lines: +2 -2 Revert version back from 2.0.4 to 2.04, I can't find any evidence supporting the change.
v. 1.6 date: 2000/04/09 21:52:07; author: cpiazza; state: Exp; lines: +3 -3 Update with the new PORTNAME/PORTVERSION variables
v. 1.5 date: 2000/03/22 00:26:31; author: obrien; state: Exp; lines: +2 -1 Restore useless version required comments.
v. 1.4 date: 2000/03/20 02:36:02; author: obrien; state: Exp; lines: +1 -2 Remove the "version required" line.
v. 1.3 date: 2000/02/13 03:23:00; author: obrien; state: Exp; lines: +3 -3 Style nits in the ports I maintain.
v. 1.2 date: 1999/08/31 02:08:56; author: peter; state: Exp; lines: +1 -1 $Id$ -> $FreeBSD$
v. 1.1 date: 1997/05/25 03:42:42; author: obrien; state: Exp; branches: 1.1.1; Initial revision
v. 1.1.1.1 date: 1997/05/25 03:42:42; author: obrien; state: Exp; lines: +0 -0 agrep is a tool for fast text searching allowing errors. The three most significant features of agrep that are not supported by the grep family are 1) the ability to search for approximate patterns 2) agrep is record oriented rather than just line oriented 3) multiple patterns with AND (or OR) logic queries =============================================================================



Main menu

FreeBSD

Program categories

Freebsd accessibility
Freebsd archivers
Freebsd astro
Freebsd audio
Freebsd benchmarks
Freebsd biology
Freebsd cad
Freebsd chinese
Freebsd comms
Freebsd converters
Freebsd databases
Freebsd deskutils
Freebsd devel
Freebsd dns
Freebsd editors
Freebsd emulators
Freebsd finance
Freebsd french
Freebsd ftp
Freebsd games
Freebsd german
Freebsd graphics
Freebsd hebrew
Freebsd hungarian
Freebsd irc
Freebsd japanese
Freebsd java
Freebsd korean
Freebsd lang
Freebsd mail
Freebsd math
Freebsd mbone
Freebsd misc
Freebsd multimedia
Freebsd net
Freebsd net-im
Freebsd net-mgmt
Freebsd net-p2p
Freebsd news
Freebsd palm
Freebsd polish
Freebsd ports-mgmt
Freebsd portuguese
Freebsd print
Freebsd russian
Freebsd science
Freebsd security
Freebsd shells
Freebsd sysutils
Freebsd textproc
Freebsd ukrainian
Freebsd vietnamese
Freebsd www
Freebsd x11
Freebsd x11-clocks
Freebsd x11-drivers
Freebsd x11-fm
Freebsd x11-fonts
Freebsd x11-servers
Freebsd x11-themes
Freebsd x11-toolkits
Freebsd x11-wm