Xref: utzoo comp.arch:21354 comp.os.misc:1641 Path: utzoo!news-server.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.arch,comp.os.misc Subject: Re: Globbing Message-ID: Date: 11 Mar 91 03:02:15 GMT References: <1991Feb18.152347.28521@dgbt.doc.ca> <474@bria> <19217@cbmvax.commodore.com> <5573:Feb2307:19:4491@kramden.acf.nyu.edu> <00085@meph.UUCP> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Followup-To: comp.os.misc Organization: Xenix Support, FICC Lines: 43 In article <00085@meph.UUCP> gsarff@meph.UUCP writes: > WMCS: > wscan *.c include*.h > UNIX: > grep include\*.h *.c You mean "grep 'include.*.\h' *.c". You have to escape the . from grep. > Which is easier now? Oh, the UNIX way, I should have thought of that and > used "find" or written a shell script on the command line and suffered the > process creation overhead as the thing loaded and ran grep 24,000 times, > silly me. Which looks easier now? ls (or find) | xargs ... > find / -name \* -exec grep include\*.h \{\} \; find / -print | xargs grep 'include.*\.h' > Now which is easier? Five backslashes for UNIX, the perfect environment for > developers? Bah! One backslash, and that having nothing to do with globbing. > Oh, but programmers and users should be forced to remember which arguments > need to be escaped *all* arguments need to be escaped. Easy. The other way you have to remember which commands which programmers remembered to include globbing. > Every time I have asked which seems easier above, I meant for the user. Me too. > I for one have more important things to do, like improving the > kernel and utilities, to spare time remembering what should be quoted and > what should not. Well then you're doing well with UNIX, where you don't have to remember any such thing. -- Peter da Silva. `-_-' peter@ferranti.com +1 713 274 5180. 'U` "Have you hugged your wolf today?"