Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!cbnewsh!nrf From: nrf@cbnewsh.att.com (neal.r.fildes) Newsgroups: comp.unix.misc Subject: Re: Arg list too long error? Here's a work-around. Message-ID: <1990Nov16.193302.7410@cbnewsh.att.com> Date: 16 Nov 90 19:33:02 GMT References: <1990Nov16.041546.12798@druid.uucp> Organization: AT&T Bell Laboratories Lines: 12 > In article <1990Nov16.001140.11923@druid.uucp> >>ls | grep '^SRW' | while read X >>do rm $X >>done > I would recommend the xargs(1) command for such things. it saves fork/exec's e.g. ls | grep '^SRW' | xargs rm xargs bunches up a number of arguments into one fork/exec!