bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #10678] xargs: unmatched single quote


From: James Youngman
Subject: [bug #10678] xargs: unmatched single quote
Date: Sun, 20 Aug 2006 10:48:47 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.4) Gecko/20060406 Firefox/1.5.0.4 (Debian-1.5.dfsg+1.5.0.4-1)

Follow-up Comment #8, bug #10678 (project findutils):

Command 4 works fine for me.  Your command 5 is slightly wrong.  By default
xargs does nothing with {} unless you specify -I.  Example:

address@hidden:~$ mkdir C#
address@hidden:~$ cd C#
address@hidden:~/C#$ touch "C# programmer's guide.doc"
address@hidden:~/C#$ ls -1
C# programmer's guide.doc
address@hidden:~/C#$ find -type f -print0 | xargs -0 -r md5sum
d41d8cd98f00b204e9800998ecf8427e  ./C# programmer's guide.doc
address@hidden:~/C#$ find -type f -print0 | xargs -0 -I{} -r md5sum {}
d41d8cd98f00b204e9800998ecf8427e  ./C# programmer's guide.doc

You used quotes in your fifth command, but in fact xargs does not pass the
commands it executes to the shell (nor does find -exec).  It just executes
them directly.  Therefore no quoting of the filenames to protect them from
interpretation by the shell is needed.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?10678>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]