Re: [Forum] Change case på filenames

From: Kasper Hald <khald@chem.au.dk>
Date: Wed Apr 10 2002 - 14:36:05 CEST

Hej Forum.

Quoting Mads Toftum <mads@toftum.dk>:

> On Wed, Apr 10, 2002 at 02:10:47PM +0200, Jens Rohde wrote:
> > Uhm... nogen der lige ligger inde med et par linier shell-script, der kan
> > konvertere alle filnavne i et dir til store eller små bogstaver... skal
> > lige have ryddet op efter en windows-bruger ;)
> >
> Noget i stil med
>
> #!/bin/bash
> for f in *
> do
> name=`basename $f`
> low=`echo $fname | tr A-Z a-z`

$fname skal være $name ;-)

> if [ $f != $low ]
> then
> mv $f $low
> fi
> done
>
>

M.v.h.

Kasper.

-- 
Kasper Hald
Ph.D.-student in theoretical chemistry
For further information see http://www.chem.au.dk/~khald
Received on Wed Apr 10 14:36:05 2002

This archive was generated by hypermail 2.1.8 : Tue Jul 19 2005 - 16:03:36 CEST