Arg list too long error? Here's a work-around.

neal.r.fildes nrf at cbnewsh.att.com
Sat Nov 17 06:33:02 AEST 1990


> In article <1990Nov16.001140.11923 at 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!



More information about the Comp.unix.misc mailing list