Path: utzoo!utgpu!water!watmath!clyde!burl!codas!mtune!whuts!homxb!hropus!jgy From: jgy@hropus.UUCP (John Young) Newsgroups: comp.unix.wizards Subject: Re: folding arguments Message-ID: <44@hropus.UUCP> Date: 12 Feb 88 15:23:21 GMT References: <3822@megaron.arizona.edu> Organization: Bell Labs, Holmdel, NJ Lines: 20 > I frequently do stuff like > > $ command `find $DIR -print` > > which bombs out when I find too many files. I've written a little program > that lets me do > > $ find $DIR -print | fa | while read x; do command $x; done > > Im willing to post it since it might be useful to others but first I'd like > to know if you've got a better solution. > Yes, on System V you can say: $ find $DIR -print | xargs command xargs will read it's standard input and by default execute 'command' with as many arguments as can fit. As usual there are an array of other options.