Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!bellcore!faline!thumper!ulysses!andante!alice!andrew From: andrew@alice.UUCP (Andrew Hume) Newsgroups: comp.unix.wizards Subject: Re: what should egrep '|root' /etc/passwd print? Summary: obvious but not useful Message-ID: <8209@alice.UUCP> Date: 16 Sep 88 21:51:14 GMT References: <44414@beno.seismo.CSS.GOV> <68203@sun.uucp> <8202@alice.UUCP> <410@quintus.UUCP> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 13 it sounds appealing to allow a missing RE to mean the empty string but i am unconvinced as to its utility. the examples show this; there is little to choose between grep -c '' and grep -c '^' for counting lines. the latter is one char longer but needs no new concepts. if the example you realy want to work is ls | egrep '\.c(|\.BAK)$' - find *.c and *.c.BAK files then you can do that with the current egrep by ls | egrep '\.c(\.BAK)?$' this time the patterns are the same length but no new concepts required. can anyone think of other useful meanings for the null RE?