[Gllug] Changing case on filenames
Nix
nix at esperi.demon.co.uk
Sat Mar 9 18:07:18 UTC 2002
On Tue, 5 Mar 2002, Simon Stewart stipulated:
> You're right, but the filenames should be quoted:
>
> mv "$i" "`echo $i | tr 'A-Z' 'n-z-a-m'`"
>
> is more safe. As someone on this list (tet?) likes to point out
> occasionally.
This also is unsafe; you mean
mv "./$i" "./`echo $i | tr 'A-Z' 'n-z-a-m'`"
(which isn't safe if you're mving absolute filenames; it can be extended
to handle that but it's really ugly)
or, with a reasonably new mv(1)
mv -- "$i" "`echo $i | tr 'A-Z' 'n-z-a-m'`"
--
`Frankly I wonder whether you are not writing your posts from underneath a
bridge.' --- Jason Clifford, to a particularly dense troll
--
Gllug mailing list - Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug
More information about the GLLUG
mailing list