Path: utzoo!censor!geac!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!att!ima!ptlcamb!peterb From: peterb@ptlcamb.UUCP Newsgroups: comp.arch Subject: Re: How wrong is MS-DOS? (or: What Message-ID: <1@ptlcamb> Date: 18 Jan 91 19:38:00 GMT References: <1991Jan6.232549.2764@isis.cs.du.edu> Lines: 26 Nf-ID: #R:<1991Jan6.232549.2764@isis.cs.du.edu>:65270:<1@ptlcamb>:1130475728:000:1251 Nf-From: ptlcamb.UUCP!peterb Jan 18 14:38:00 1991 >From article , by ppessi@niksula.hut.fi (Pekka Pessi): >> [...] >> See regex(3). So you are not ignorant about Unix? > >No, I'm not. The existence of regex(3) _supports_ my prosition on grep. >That is: grep is a trivial tool that doesn't have any business being a >separate utility. In nearly every context where people recommend the >use of grep, regex() is a _better_ solution. For one thing, it saves >the overhead of using pipes - passing the strings as procedure arguments >is a lot more efficient (in this case, the pipe overhead is probably >_bigger_ than the execution time of the whole pattern search). Or, is Right, a pipe only costs for the amount of data being passed through it. I sure hope you don't think to cat the file and pipe the output into grep like this: cat file | grep string If you are, get a clue. You can redirect input into grep which doesn;t use a pipe, Or you can even pass the file name to grep. Or even file names to grep. RTFM first. Flame second, Duck third. -- Peter Barada / ...!{harvard|bu.edu|think|uunet}!ima!ptlcamb!peterb Phoenix Technologies Ltd. / Peripherals Group / 617-551-5000 (USA) Clone the Bone!!! / Opinions are mine; Phoenix cloned them from me...