Xref: utzoo comp.unix.wizards:8793 comp.unix.questions:7231 Path: utzoo!attcan!uunet!husc6!uwvax!umn-d-ub!umn-cs!attila!papowell From: papowell@attila.uucp (Patrick Powell) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: grep replacement Message-ID: <5630@umn-cs.cs.umn.edu> Date: 25 May 88 13:09:18 GMT References: <7882@alice.UUCP> Sender: news@umn-cs.cs.umn.edu Reply-To: papowell@attila.UUCP (Patrick Powell) Organization: University of Minnesota, Minneapolis Lines: 34 Posted: Wed May 25 08:09:18 1988 In article <7882@alice.UUCP> andrew@alice.UUCP writes: > > Al Aho and I are designing a replacement for grep, egrep and fgrep. >The question is what flags should it support and what kind of patterns >should it handle? (Assume the existence of flags to make it compatible >with grep, egrep and fgrep.) > >please send your comments about flags or patterns to research!andrew The one thing I miss about grep families is the ability to have a named search pattern. For example: DIGIT= \{[0-9]\} ALPHA=\{[a-zA-Z]\} \${ALPHA}\${PATTERN} This would sort of make sense. The other facility is to find multiple line patterns, as in: find the pair of lines that have pattern1 in the first line pattern2 in the second, etc. This I have needed sooo many times; I have ended up using AWK and a clumsy set of searches. For example: \#{1 p}Pattern \#{2}Pattern This could print out lines that match, or only the first line (1p->print this one only). Patrick Powell Prof. Patrick Powell, Dept. Computer Science, 136 Lind Hall, 207 Church St. SE, University of Minnesota, Minneapolis, MN 55455 (612)625-3543/625-4002