[Gllug] Poor scripting?!
John Edwards
john at cornerstonelinux.co.uk
Tue Mar 11 16:53:38 UTC 2008
On Tue, Mar 11, 2008 at 04:37:07PM +0000, Richard Huxton wrote:
> John Edwards wrote:
>> On Tue, Mar 11, 2008 at 04:01:54PM +0000, Richard Huxton wrote:
>>> Ah, xargs --max-args should handle that though.
>>
>> But won't that leave some directories unchanged as xargs with truncate
>> the list of directories that find supplies?
>
> Hmm - I thought it just forked another target command to handle the excess:
>
> cd /usr/share/doc; find . -type d | xargs --max-args=3 echo `date` "$*"
> | head
>
> Yep, or have I misunderstood what you meant?
No, you're right.
I didn't realised that xargs could run multiple consecutive commands
when manpage said:
--max-args=max-args, -n max-args
Use at most max-args arguments per command line.
<snip>
--
#---------------------------------------------------------#
| John Edwards Email: john at cornerstonelinux.co.uk |
#---------------------------------------------------------#
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Digital signature
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20080311/9dfb5059/attachment.pgp>
-------------- next part --------------
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list