[OT] Changing the case of filenames

Steven W. Orr steveo at syslang.net
Fri Apr 29 14:43:11 UTC 2005


On Friday, Apr 29th 2005 at 08:51 -0500, quoth esm at logic.net:

=>On Fri, Apr 29, 2005 at 09:39:27AM -0400, 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).
=>
=>( for i in *; do mv "$i" "`echo $i | tr [a-z] [A-Z]`"; done )
=>

But why run the command inside of a subshell? That's all that parens do. 
If you need grouping (which you do not here) and you don't need to be in a 
subshell, then just use braces.

-- 
steveo at syslang dot net TMMP1 http://frambors.syslang.net/
Do you have neighbors who are not frambors?




More information about the fedora-list mailing list