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

Re: Uppercasing filenames



At 2003-09-20T23:34:37Z, Bijan Soleymani <bijan@psq.com> writes:

> oops that should be:
> 	`mv "$file" "$newname"`;
> So that files with spaces won't screw up.

That won't work either.  Suppose that $file contains a doublequote?

If you're in Perl anyway, use:

   rename $file, $newname;

which doesn't care about spaces or punctuation, and calls the appropriate
libc functions directly rather than causing an expensive fork/exec.
-- 
Kirk Strauser

Attachment: pgp9sS0LuRO3Q.pgp
Description: PGP signature


Reply to: