Re: converting uppercase into lowercase
- From: "ynotssor" <ynotssor@xxxxxxxxxxx>
- Date: Fri, 23 Feb 2007 13:01:22 -0800
In news:45df3e0e$0$512$e4fe514c@xxxxxxxxxxxxxxxxxxxxxxxx,
Huub" <"v.niekerk at hccnet.nl <"v.niekerk at hccnet.nl"> wrote:
I've downloaded some html files (forming a manual) and for some reason
all filenames are in uppercase while the files redirect in lowercase.
Result is that I get 'no page found' for every other page. How can I
quickly convert all filenames into lowercase? There are some 120
files.
If they're all in a single directory, you can cd there and copy and paste:
for i in *[A-Z]*; do mv "$i" "`echo $i | tr [A-Z] [a-z]`"; done
but it might be prudent to create a simple script that you see beforehand
exactly makes the changes that you want. You may need to modify the "ls
*[A-Z]*" component to a construct using "find" e.g., if the files are in
subdirectories:
cd /dir/where/files/are
echo cd \"`pwd`\" > ./junk
ls *[A-Z]* | perl -ne 'chop; \
printf "mv \"$_\" \"%s\"\n", lc $_;' >> ./junk
# Examine the file ./junk and if it meets your expectations, then:
bash ./junk
and you're finished.
.
- References:
- converting uppercase into lowercase
- From: Huub
- converting uppercase into lowercase
- Prev by Date: Re: converting uppercase into lowercase
- Next by Date: Re: converting uppercase into lowercase
- Previous by thread: Re: converting uppercase into lowercase
- Index(es):
Relevant Pages
|
|