Look! An xargs!! (Re: recursive grep)

Bob McGowen Wyse Technology Training bob at wyse.wyse.com
Fri Sep 8 06:10:33 AEST 1989


In article <10967 at smoke.BRL.MIL> gwyn at brl.arpa (Doug Gwyn) writes:
>In article <2404 at wyse.wyse.com> bob at wyse.UUCP (Bob McGowen Wyse Technology Training) writes:
---deleted code---
>Worse and worse.  Now it does nothing at all when there are a lot of
>arguments (which is usually the case for "xargs"!).

My apologies for not attempting to write a complete, debugged and fully
functional program for you.

My objective, which has also been the contention of others, is to state
that you CAN implement xargs in the shell (or awk or ?) and handle the
problems, NOT to write the whole thing!

(I noticed that someone had just posted a "complete" xargs written in awk.
Perhaps this will meet all your objections and solve all the problems you
can think of.)

I would also like to know the circumstances which prompt you to state that
xargs will do nothing when there are a lot of "arguments".  Do you mean
the items piped in or those on the xargs command line?  The manual and
my experience indicate that the program will work fine with large amounts
of standard input, it generates a series of invocations of the command to
run without any problems that I can see.  Note that I have only used the
xargs default buffer (which the manual (XENIX 2.3) says is 470 characters
max) which may be different in your environment.

Cheers!

Bob McGowan  (standard disclaimer, these are my own ...)
Customer Education, Wyse Technology, San Jose, CA
..!uunet!wyse!bob
bob at wyse.com



More information about the Comp.unix.wizards mailing list