Path: utzoo!utgpu!water!watmath!clyde!bellcore!decvax!ucbvax!husc6!cmcl2!arizona!lm From: lm@arizona.edu (Larry McVoy) Newsgroups: comp.unix.wizards Subject: Re: folding arguments Message-ID: <3839@megaron.arizona.edu> Date: 12 Feb 88 23:12:03 GMT References: <3822@megaron.arizona.edu> <120@gsg.UUCP> Reply-To: lm@megaron.arizona.edu.UUCP (Larry McVoy) Organization: University of Arizona, Tucson Lines: 18 In article <120@gsg.UUCP> lew@gsg.UUCP (Paul Lew) writes: >I used the following frequently: > > $ find $DIR -print | awk '{print "command",$0}' | sh (flexible) >or: > $ find $DIR -print | sed 's/^/command /' | sh (fast) > >Both are shorter than the 2nd command and it does not need program 'fa'. But I think this has the following problem: "command" gets exec-ed once per argument. That's exactly what I want to avoid. I really want infinite space for args to exec but failing that I want something that bunchs up args into suitable form for an exec. So fa will fit as many as it can in, say 5000 bytes (configurable at runtime), so I don't have to run the same command so many times. -- Larry McVoy lm@arizona.edu or ...!{uwvax,sun}!arizona.edu!lm Use the force - read the source.