[OT] Changing the case of filenames

Terry Polzin fox3ec208 at wideopenwest.com
Fri Apr 29 13:50:33 UTC 2005


On Friday 29 April 2005 09:39 am, David Niemi wrote:
> I am running a fortran program which requires all input file names to be
> uppercase.  As things were originally done in Windo$e all the filenames
> are mixed case (with numbers).
>
> Searching around I came across the "tr" command, but my difficulty comes
> in trying to use this from the command line (or even in a bash script).
>
>     mv * | tr [a-z] [A-Z]
>
> Does not work as mv requires a directory for the objective with multiple
> files.  All of the scripts that I have seen are mainly for changing the
> case of text in a text file so wouldn't work for me.
>
> So, how would I do this?

find . -type f -exec tr [a-z] [A-Z]  {} \;
should work
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.fedoraproject.org/pipermail/users/attachments/20050429/ceccd85a/attachment-0002.bin 


More information about the users mailing list