Mail Archives: cygwin/1998/03/12/05:36:26
-----Original Message-----
From: Randall <randall AT alum DOT mit DOT edu>
To: gnu-win32 AT cygnus DOT com <gnu-win32 AT cygnus DOT com>
Date: Wednesday, March 11, 1998 5:44 AM
Subject: Another vote on the case-sensitivity issue
....
>Btw, for those of you fortunate enough to have perl for Win32 installed (I
>gotta do that one of these days!), you might have use for an adaptation of
>the following perl script:
>
>#!/usr/local/bin/perl -w
>## tolower.pl: Convert listed filenames to lowercase
>## Copyright 1997-1998 Randall Whitman
>## May be copied under terms of the GNU General Public License
>
>mkdir Tmp,777 or die "Tmp already exists.";
>chmod 0700, Tmp;
>
>foreach $file (@ARGV)
>{
> print $file, "\t", lc($file), "\n";
> system "mv $file Tmp";
> $outfile = lc($file);
> system "cp -p Tmp/$file $outfile";
>}
>
for those of you without perl, the following shell script might be useful
++++++++++++++ cut ++++++++++++
#!/bin/bash
# file: smallnames
# recursively convert all files and directories to lowercase names
# usage:
# smallnames <directory>
for f
do
newname=`echo $f | tr A-Z a-z`
if [ $f != $newname ]; then
mv $f $f.lc
echo -e $f \=\> $newname
mv $f.lc $newname
fi
if [ -d $newname ]; then
cd $newname
pwd
smallnames `ls` &
cd ..
fi
done
++++++++++++++ cut ++++++++++++
Note this will recursively traverse your directories from the starting
point, so be careful.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".
- Raw text -