Re: [SLUG] Change case of filenames

From: John Gould (johng3@tampabay.rr.com)
Date: Sun Dec 07 2003 - 02:48:43 EST


Ok, I know its a pretty lame script, but it was the first one I wrote
for Intro to Unix at HCC. It's designed to do just what you are
looking for; changing filenames to lowercase from uppercase. Hope it
helps, or gets you on the right path for your own.

Thor

#!/bin/bash
# Script for changing file names from upper to lowercase.
# Written by Thor Gould (c) 2003 for Intro to Unix (Mr. Pollock)

echo "Enter filename to capitalize: "
read fname

mv "$fname" `echo "$fname" | tr [A-Z] [a-z]`

jeff wrote:
> I downloaded an ebook today which has a problem. The filenames are all
> uppercase but the TOC page and the index.htm links are specifying that
> filename in lowercase, and with Linux being case sensitive obviously the
> file is not found. Is there an easy and quick way to change all the 150+
> filenames (they are all html and jpg files) in that directory from
> uppercase to lowercase?
>
> Thanks,
> Jeff
>
> -----------------------------------------------------------------------
> This list is provided as an unmoderated internet service by Networked
> Knowledge Systems (NKS). Views and opinions expressed in messages
> posted are those of the author and do not necessarily reflect the
> official policy or position of NKS or any of its employees.
>

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:23:55 EDT