recursive grep

Rob McMahon cudcv at warwick.ac.uk
Thu Aug 31 03:16:17 AEST 1989


Re: `find ... -print | xargs' and filenames with spaces/newlines.

In article <9408 at chinet.chi.il.us> les at chinet.chi.il.us (Leslie Mikesell) writes:
>Well, how would you go about parsing filenames out of a list if you can't use
>spaces or newlines as the delimiters?

Spaces should be no problem.  Find prints it's filenames separated by
newlines, and xargs should have an option which means take each line of input
literally as a single argument, *not* ignoring spaces anywhere (in fact I
think this should be the default, how often do you use xargs with more than
one argument per line ?).  It would be useful if find quoted each newline in a
filename with a backslash.

Rob
-- 
UUCP:   ...!mcvax!ukc!warwick!cudcv	PHONE:  +44 203 523037
JANET:  cudcv at uk.ac.warwick             ARPA:   cudcv at warwick.ac.uk
Rob McMahon, Computing Services, Warwick University, Coventry CV4 7AL, England



More information about the Comp.unix.wizards mailing list