In message <>, Mate Wierdl
 dixit:
>I am reading UNIX POWERTOOLS (1st ed), and there, in the discussion
>around xargs on pg 170, Section 10.21, it is kind'a implied that the
>shell might have problems with argument size---hence one should use
>xargs.
>
>In other words, even if nmh is fine, the shell might complain. 

Shell arguments are passed to the process on its stack. Since this is
inevitably finite (see getrlimit(2) on Solaris for example), it's more
than likely that some very long lists of arguments will exceed the
permitted size.

xargs knows about the limits and splits the long argument list into
suitably-sized chunks. It's useful when you don't know how long the
list might be but want to minimize the process-creation overhead,
e.g.:

        find / -name core -print | xargs /bin/rm -f

Of course if you have a single huge argument that goes over the limit
you're out of luck ...

Patrick O'Callaghan <[EMAIL PROTECTED]> <http://www.ldc.usb.ve/~poc>
Universidad Simon Bolivar, Caracas, Venezuela       | "Errare
Tel: +58 (2) 906-3200, FAX: +58 (2) 906-3202        | uHmanum
Handle: PO22-ARIN        (Postal address on request)| Est"

Reply via email to