Path: utzoo!mnetor!uunet!husc6!hao!noao!arizona!lm From: lm@arizona.edu (Larry McVoy) Newsgroups: comp.unix.wizards Subject: folding arguments Message-ID: <3822@megaron.arizona.edu> Date: 11 Feb 88 21:16:23 GMT Reply-To: lm@megaron.arizona.edu (Larry McVoy) Organization: University of Arizona, Tucson Lines: 23 References: 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 I'm 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. The problem is splitting a find stream into lines that will fit into argv. Fa will take options as to what is reasonable; defaults are 5000 chars and 1000 args max.) I'd rather not have to drag this around but I don't want some gross shell script solution either (i.e. I want to be able to get it all in on one command line == ~80 chars). I'd use xargs but that's a s5-ism. Is there a BSD equiv? Comments? -- Larry McVoy lm@arizona.edu or ...!{uwvax,sun}!arizona.edu!lm Use the force - read the source.