Re: [OT] Changing the case of filenames

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

 



On Fri, Apr 29, 2005 at 02:45:05PM +0100, Paul Howarth wrote:
> You could use a script like this one:
> 
> #!/bin/sh
> for f in *
> do
>         F="`echo $f | tr a-z A-Z`"
>         echo Renaming \"$f\" to \"$F\"
> 	mv "$f" "$F"
> done
> 

Or more concisely

for f in *; do mv -v $f $( echo $f | tr a-z A-Z ); done

(Not that there's anything wrong with the original script.)


-- 
Matthew Miller           mattdm@xxxxxxxxxx        <http://www.mattdm.org/>
Boston University Linux      ------>                <http://linux.bu.edu/>
Current office temperature: 72 degrees Fahrenheit.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux