Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!apple!vsi1!wyse!bob From: bob@wyse.wyse.com (Bob McGowen Wyse Technology Training) Newsgroups: comp.unix.wizards Subject: Re: Look! An xargs!! (Re: recursive grep) Message-ID: <2415@wyse.wyse.com> Date: 7 Sep 89 20:10:33 GMT References: <666@lakart.UUCP> <1641@cbnewsl.ATT.COM> <7774@cbmvax.UUCP> <16816@pasteur.Berkeley.EDU> <1126@virtech.UUCP> <2404@wyse.wyse.com> <10967@smoke.BRL.MIL> Sender: news@wyse.wyse.com Reply-To: bob@wyse.UUCP (Bob McGowen Wyse Technology Training) Organization: Wyse Technology Lines: 32 In article <10967@smoke.BRL.MIL> gwyn@brl.arpa (Doug Gwyn) writes: >In article <2404@wyse.wyse.com> bob@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@wyse.com