bug#1065: [BusyBox] bug#1065: New xargs bug!

Mark Whitley markw at lineo.com
Tue Nov 14 17:25:27 UTC 2000


On Mon, Nov 13, 2000 at 04:37:28PM +0000, Kent Robotti wrote:
> This is a test of the xargs from mark whitley 
> in this list.
> 
> file1 file2 file3
> 
> # find . -name "file*" | xargs ls
> 
> ./file1 ./file2 ./file3 
> 
> # find . -name "file*" | xargs ls -l
> 
> ./file1 ./file2 ./file3 
> 
> It doesn't seem to recognize any
> arguments beyond 1.

Thanks for finding this bug. I dunno if this should've been filed in the bug
tracking system though, 'cuz technically this isn't the official xargs yet. Oh
well, it's probably better to keep track of it somewhere.

The good news is, I know why this is happening and the fix should be pretty
simple. Gimme a little while and I'll post a new xargs you can test.

On Tue, Nov 14, 2000 at 05:50:35AM -0600, David Douthitt wrote:
> This bug isn't new, it's now 22 days old.  But anyway...
> 
> I suspect that somewhere ( spawn* ?  exec* ? ), xargs is putting out 
> the read arguments like this:
> 
> ("cmd", "cmdargs", "filearg filearg2 filearg3")
> 
> instead of
> 
> ("cmd", "cmdargs", "filearg", "filearg2", "filearg3")

David, you're thinking of the _old_ xargs, and you are exactly right, the
filenames were being passed in a big string ($*) rather than one at a time
($@). The new xargs I wrote is specifically designed to act one files one at a
time so we can close this 22 day old bug. Like I said to Kent, I will post a
new xargs today. When I do, please test it (instead of the old xargs). Thanks.


Mark Whitley
markw at lineo.com






More information about the busybox mailing list