|
From: | Padraig Brady |
Subject: | Re: xargs blows up on files with stupid characters in their names |
Date: | Sun, 23 Dec 2001 10:53:11 +0000 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011120 |
Jamie Zawinski wrote:
Padraig Brady wrote:#touch file\'1 #find file* -print0 | xargs -0 file'1So I assume you're saying "this is not a bug, use different args instead?"
Yes.
I can't see any reason to favor the current xargs behavior: why would I *want* it to mis-interpret one file name as two? If I give xargs a stdin of foo' bar blat' foop then it ought to just be invoking execvp ("program", ["foo' bar", "blat' foop", 0]); Why is it interpreting shell-syntax characters in the input at all, instead of just using the line as-is?
Well for the reason stated, that you can support args with spaces with the standard xargs parsing format. Now I'd say this came before xargs -0 and is still there for backwards compatability? I agree that this is of no use when you have -0, but in saying that you do have -0 so use it :-) Padraig.
[Prev in Thread] | Current Thread | [Next in Thread] |