Xref: utzoo comp.unix.wizards:8843 comp.unix.questions:7268 Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!fxgrp!ljz From: ljz@fxgrp.UUCP (Lloyd Zusman) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: grep replacement Message-ID: <662@fxgrp.UUCP> Date: 25 May 88 21:44:32 GMT References: <7882@alice.UUCP> <5630@umn-cs.cs.umn.edu> Reply-To: ljz%fx.com@ames.arc.nasa.gov (Lloyd Zusman) Organization: Master Byte Software, Los Gatos, California Lines: 35 In article <5630@umn-cs.cs.umn.edu> papowell@attila.UUCP (Patrick Powell) writes: 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? ... ... 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). ... Or another way to get this functionality would be for this new greplike thing to allow matches on the newline character. For example: ^.*foo\nbar.*$ ^^ newline -- Lloyd Zusman UUCP: ...!ames!fxgrp!ljz Master Byte Software Internet: ljz%fx.com@ames.arc.nasa.gov Los Gatos, California or try: fxgrp!ljz@ames.arc.nasa.gov "We take things well in hand."