Xref: utzoo comp.unix.wizards:8726 comp.unix.questions:7200 Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!alice!andrew From: andrew@alice.UUCP Newsgroups: comp.unix.wizards,comp.unix.questions Subject: grep replacement Summary: proposal for a replacement for grep/egrep/fgrep Message-ID: <7882@alice.UUCP> Date: 23 May 88 15:22:02 GMT Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 23 Posted: Mon May 23 11:22:02 1988 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.) The proposed flags are the V9 flags: -f file pattern is (`cat file`) -v print nonmatching -i ignore aphabetic case -n print line number -x the pattern used is ^pattern$ -c print count only -l print filenames only -b print block numbers -h do not print filenames in front of matching lines -H always print filenames in front of matching lines -s no output; just status -e expr use expr as the pattern The patterns are as for egrep, supplemented by back-referencing as in \{pattern\}\1. please send your comments about flags or patterns to research!andrew