Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!ucbvax!agate!pasteur!buddy.Berkeley.EDU!deboor From: deboor@buddy.Berkeley.EDU (Adam R de Boor) Newsgroups: comp.unix.wizards Subject: Re: Look! An xargs!! (Re: recursive grep) Message-ID: <16816@pasteur.Berkeley.EDU> Date: 3 Sep 89 23:06:57 GMT References: <666@lakart.UUCP> <1641@cbnewsl.ATT.COM> <7774@cbmvax.UUCP> <4026@buengc.BU.EDU> <1122@virtech.UUCP> Sender: news@pasteur.Berkeley.EDU Reply-To: deboor@buddy.Berkeley.EDU.UUCP (Adam R de Boor) Organization: University of California, Berkeley Lines: 20 Shell scripts 201 (Graduate level :) #!/bin/sh - args="" while read arg; do args="$args $arg" done $* $args Problems with args like -m'this thing has spaces' when given to the above script are left as an exercise for the reader. While the lecturer in SS101 was wrong in his solution of the problem (or perhaps misunderstood the problem itself), his contention that xargs can be solved with a rudimentary shell script is correct, q.e.d. (or some similar abbreviation, hee hee) a