Linux.com

Agrep makes a fine search tool for files like this

Posted by: Administrator on November 06, 2006 06:19 AM
You can use agrep (<a href="ftp://ftp.cs.arizona.edu/agrep/" title="arizona.edu">ftp://ftp.cs.arizona.edu/agrep/</a arizona.edu>) to search
files in this sort of "stanza" format. For example, using "###" as
the delimiter, you can find the Acme entry in file "phone" like so:

% <tt>agrep -i -d '###' acme phone</tt>

<tt>Acme Industries, Inc.</tt>

<tt>4211 E Broadway</tt>

<tt>New York, NY 10026</tt>

<tt>Phone: (212) 555-1032</tt>
<nobr> <wbr></nobr>...

#

Return to CLI Magic: Command-line contact management