bug-findutils
[Top][All Lists]
Advanced

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

Re: [PATCH] This change adds a sleep between invocations of cmd.


From: ed
Subject: Re: [PATCH] This change adds a sleep between invocations of cmd.
Date: Tue, 20 Sep 2011 18:33:02 +0000
User-agent: Mutt/1.5.18 (2008-05-17)

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/

Attachment: signature.asc
Description: Digital signature


reply via email to

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