Re: [SLUG] Change case of filenames

From: Syd Alsobrook (syd@onsyd.com)
Date: Sun Dec 07 2003 - 11:14:35 EST


rename works much better.

from the rename man page:

To translate uppercase names to lower, you'd use

               rename 'y/A-Z/a-z/' *

Syd

On Sunday 07 December 2003 02:48, you wrote:
> 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.

-- 
-----------
Protect your privacy.
http://www.epic.org
http://www.gnupg.org
PGP Key ID: 0xB7544D58

"And all I ask is a tall ship and a star to steer her by" -- John Masefield

----------------------------------------------------------------------- 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:24:14 EDT