[CLUE-Tech] xargs

Lynn Danielson lynn.danielson at clue.denver.co.us
Sun Jan 5 15:40:18 MST 2003


On Sat, 2003-01-04 at 15:52, Jason S. Friedman wrote:
> What's wrong with this:
> 
> $ find . | xargs grep mystring
> xargs: unmatched single quote
> 
> For what it's worth, none of my files have a quote character in them.

Are you certain?  This is exactly the behavior that
you'll get from xargs if you have an appostrophe in
your file name.  Try "find . | grep \'" to verify 
that you don't have any single quote characters in
your files.  One solution that should work for this
problem is to use find's "exec" switch instead of
xargs.  For example

find . -exec grep mystring {} \;

David Willson asked a very similar question a while
back, but I can't remember what other solutions were
offered.  You might want to google the archives.

Lynn




More information about the clue-tech mailing list