This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: upper/lower case question


Charles Curley wrote:
> Quick & dirty (from BASH):
> 
> mv FILE.C foo.c; mv foo.c file.c

The following script might also work, although you may have to do `mv'
twice:

for f in $*; do
  new="`echo $f | tr '[:upper:]' '[:lower:]'`"
  [ "$f" = "$new" ] || mv $f $new || exit 1
done

Surprisingly enough, it converts all arguments file names from upper
case to lower case :-)  If you call this script `lc', then invoking it
with `lc *' will lowercase all files in a directory.

//lat
-- 
Lassi.Tuura@cern.ch          There's no sunrise without a night
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]