Path: utzoo!news-server.csri.toronto.edu!rutgers!ucsd!sdd.hp.com!samsung!uunet!mcsun!ukc!mucs!logitek!grep!frank From: frank@grep.co.uk (Frank Wales) Newsgroups: comp.os.misc Subject: Re: Globbing Message-ID: <1991Mar12.173107.20826@grep.co.uk> Date: 12 Mar 91 17:31:07 GMT References: <5573:Feb2307:19:4491@kramden.acf.nyu.edu> <00085@meph.UUCP> <10803@dog.ee.lbl.gov> <125251@uunet.UU.NET> Reply-To: frank@grep.co.uk (Frank Wales) Followup-To: comp.os.misc Organization: Grep Limited, LEEDS, UK Lines: 20 In article <125251@uunet.UU.NET> sef@kithrup.COM (Sean Eric Fagan) writes: >It should also be redirected to the appropriate group (comp.os.misc). Done. :-) >In article <10803@dog.ee.lbl.gov> torek@elf.ee.lbl.gov (Chris Torek) writes: >>Actually: >> find / -name '*.c' -exec grep 'include.*\.h' {} \; > >I would suggest > > find / -name '*.c' -print | xargs grep 'include.*\.h' So would I. In addition, though (and I don't have the original article around to find out if the filenames are desired, but if they are...), I'd also pass /dev/null as an arg to grep to force it to emit them, in the unlikely event that xargs invokes it with zero or one filenames. -- Frank Wales, Grep Limited, [frank@grep.co.uk<->uunet!grep!frank] Kirkfields Business Centre, Kirk Lane, LEEDS, UK, LS19 7LX. (+44) 532 500303