Attn: AWK GURUS (Generic Search)

Jonathan I. Kamens jik at athena.mit.edu
Thu Feb 28 15:44:21 AEST 1991


  It seems to me that if your database contains simply lines with certain
characters in each column, and you want to search for lines matching a
specified pattern of characters, the simplest thing to use is grep.

  You gave an example of finding "only the records with (a) in col1, (nop) in
col19-21, (v) in col29 and (y) in col34."  How about:

    grep "^a.................   .......v....y" database-filename

Read the man page for grep if you don't understand the periods in the regular
expression above.

-- 
Jonathan Kamens			              USnail:
MIT Project Athena				11 Ashford Terrace
jik at Athena.MIT.EDU				Allston, MA  02134
Office: 617-253-8085			      Home: 617-782-0710



More information about the Comp.unix.questions mailing list