[BusyBox] bug#1065: Newer and Improveder xargs

Mark Whitley markw at lineo.com
Tue Nov 14 19:55:25 UTC 2000


On Tue, Nov 14, 2000 at 11:18:58AM -0800, kent robotti wrote:
> 
> This is a test of your most recent xargs.
> 
> file1 file2 file3
> 
> # find . -name "file*" | busybox xargs
> 
> Nothing!
>
> # find . -name "file*" | gnu xargs
> 
> ./file1 ./file2 ./file3

Good catch! I tried it and got a segfault. I fixed it in the attached file.

> # find . -name "file*" | busybox xargs ls
> 
> ./file1
> ./file2
> ./file3
> 
> # find . -name "file*" | gnu xargs ls
> 
> ./file1 ./file2 ./file3

Hmm. I'm not sure this one is worth fixing. It's pretty cosmetic and fixing it
might add more bloat than we would want. Unless there's a compelling reason,
I'd be more inclined to let this one stand. If you need to make scripts that
are compatible with both busybox xargs and GNU xargs, you could add the '-1'
flag to ls, a la: 'xargs ls -1'.

Try the version I attached and see what you think.

Mark Whitley
markw at lineo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xargs.c
Type: text/x-csrc
Size: 3288 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20001114/9867f26f/attachment.c 


More information about the busybox mailing list