batch rename

Michael P. Soulier msoulier at digitaltorque.ca
Sat Jan 5 04:56:41 PST 2008


On 05/01/08 Aryeh M. Friedman said:

> This assumes tcsh:
> 
> foreach i (`ls [A-Z][a-z]*`)
>     mv $i `echo $i|tr 'A-Z' 'a-z'`
> end

sh version:

for i in *
do
    mv $i `echo $i | tr 'A-Z' 'a-z'`
done

Mike
-- 
Michael P. Soulier <msoulier at digitaltorque.ca>
"Any intelligent fool can make things bigger and more complex... It
takes a touch of genius - and a lot of courage to move in the opposite
direction." --Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080105/c14a2931/attachment.pgp


More information about the freebsd-questions mailing list