Kyle Burton on Tue, 1 Jun 1999 20:21:09 -0400 (EDT)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Too many args for rm *.in


This might work:

################################################################################
#!/usr/bin/perl

opendir DIR, "/foo/bar/";

while( defined($file=<DIR>) ) {
  `rm $file` if $file =~ /\.in$/;
}
################################################################################

should process the files 1 at a time...it'll be slower than using rm, but it
should work.



k

------------------------------------------------------------------------------
"Q: How many psychiatrists does it take to change a light bulb? A: Only one,
but it takes a long time, and the light bulb has to really want to change." 
    -- (Arno Schaefer's .sig) 
mortis@voicenet.com                            http://www.voicenet.com/~mortis
------------------------------------------------------------------------------

On Tue, 1 Jun 1999 tburba@GLCORPIS01.usvision.com wrote:

> 
> 
> 
> 
> rm *.in fails with the error "too many arguments" (there is 15000 files).
> How do I use it with more arguments? (xargs man page makes no sense at all)
> TIA
> 
> 
> --
> To unsubscribe, send a message with the word 'unsubscribe' in the subject
> or body of your message to plug-request@lists.nothinbut.net
> 
> 

--
To unsubscribe, send a message with the word 'unsubscribe' in the subject
or body of your message to plug-request@lists.nothinbut.net