Look! An xargs!! (Re: recursive grep)
Conor P. Cahill
cpcahil at virtech.UUCP
Mon Sep 4 11:54:53 AEST 1989
In article <16816 at pasteur.Berkeley.EDU>, deboor at buddy.Berkeley.EDU (Adam R de Boor) writes:
>
> Shell scripts 201 (Graduate level :)
>
> #!/bin/sh -
> args=""
> while read arg; do
> args="$args $arg"
> done
> $* $args
Yet another non-solution. This one does not handle the problem where the
list of arguments exceeds the maximum length (usually 5120 bytes).
Also there is a dependency that the args variable in the while loop is
available outside the loop. I have found that this is not always true
due to the fact that the while loop may be implemented using a sub-shell.
I guess we need a post-graduate level course, or a beginners c program class.
--
+-----------------------------------------------------------------------+
| Conor P. Cahill uunet!virtech!cpcahil 703-430-9247 !
| Virtual Technologies Inc., P. O. Box 876, Sterling, VA 22170 |
+-----------------------------------------------------------------------+
More information about the Comp.unix.wizards
mailing list