Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!athena.mit.edu!jik From: jik@athena.mit.edu (Jonathan I. Kamens) Newsgroups: comp.unix.questions Subject: Re: Attn: AWK GURUS (Generic Search) Message-ID: <1991Feb28.044421.23405@athena.mit.edu> Date: 28 Feb 91 04:44:21 GMT References: <354@marst2> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 18 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@Athena.MIT.EDU Allston, MA 02134 Office: 617-253-8085 Home: 617-782-0710