> Actually, it's more like
>
> while stdin not empty:
> args_list = []
> while arg_list < maximum length:
> push a line from stdin into arg_list
> invoke program with arg_list
>
Ah, thanks for clearing few things! :-) Is this why xargs is more efficient?
This thing pointed out the difference:
$ ls | xargs echo
vs.
$ ls | perl -lane 'print $F[0]'
:-)
For others who might be reading this, find also has a similar option.
>From it's manpage:
-exec utility [argument ...] {} +
Same as -exec, except that ``{}'' is replaced with as many pathnames as
possible for each invocation of utility. This behaviour is similar to
that of xargs(1).
--
Vimal
--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [EMAIL PROTECTED]
Please read the FAQ at http://kernelnewbies.org/FAQ