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

Re: Uppercasing filenames



Thus spake Bijan Soleymani:
> On Sat, Sep 20, 2003 at 05:52:44PM -0400, Bijan Soleymani wrote:
> > #!/usr/bin/perl
> > @files=`ls`;
> > foreach $file (@files)
> > {
> >     chomp $file;
> >     if(-f $file)
> >     {
> > 	$newname = uc $file;
> > 	`mv $file $newname`;
> oops that should be:
> 	`mv "$file" "$newname"`;
> So that files with spaces won't screw up.

Of course, if you're going to use perl...

rename "y/a-z/A-Z/" *


-- 
Nathan Poznick <poznick@conwaycorp.net>

"America is a large friendly dog in a small room. Every time it wags
its tail it knocks over a chair." -- Arnold Toynbee

Attachment: signature.asc
Description: Digital signature


Reply to: