Click to See Complete Forum and Search --> : renaming files


spacedog
02-11-2003, 05:36 PM
I can do this in PERL easily, but im wondering if i want to rename a file, making it lowercase how can i do so using the Shell, bash in particular

Modorf
02-11-2003, 05:43 PM
why not just utilize perl?
It is simple and you said you know how to do it.

Nathan.

chrism01
02-12-2003, 10:18 AM
Here's an example in bash:

#!/bin/bash
infile="T.T"
outfile=`echo $infile|tr [A-Z] [a-z]`
echo $outfile

In kornshell you could use
typeset -l $infile
to change the variable in situ.

:)