for i in `ls`
do
x=`echo $i | tr [a-z] [A-Z]`
mv $i $x
done
Note that cat will translate the contents of the file, not filename
Mitchell wrote:
>
> > Hi DBAs
> >
> > I have a lof of file name like IDP2000.z for tuxedo servers. I need to
> > changed name to idp2000.Z.
> >
> > Mitchell
> >
>
> I rewrite the script and failed again. Any idea how to user typeset -l and
> tr command.
> Mitchell
>
> #!/usr/bin/ksh
> # init_idp.ksh
> # 2001-05-09 /Mitchell
> #
> ls -la IDP* | awk ' { print $9 } ' > tobechanged
> #
> while read file
> do typeset -l
> lfile=$file;
> cat $lfile | tr lzl [Z] > $lfile
> mv $file $lfile;
> done < tobechanged
> #
> echo 'Job is done !'
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Mitchell
> INET: [EMAIL PROTECTED]
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: SuzyV
INET: [EMAIL PROTECTED]
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
San Diego, California -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from). You may
also send the HELP command for other information (like subscribing).