On Wed, Sep 22, 2010 at 11:13:59PM +0100, James Youngman wrote: > But why would you not just use > > .... | xargs sh -c 'sleep 60 && exec command ... "$@"' command > > ?
Gave that a go today on a vanilla xargs and it doesn't seem to work:
$ perl -e 'for(my $a=0;$a<100;$a++){print $a,"\n";}' | xargs -l2 sh -c
'sleep 1 &&exec /bin/echo "$@"'
1
3
5
^C
For whatever reason the shell seems to throw the first argument away.
--
Best regards,
Ed http://www.s5h.net/
signature.asc
Description: Digital signature
