Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: change filename case
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: mitchell_at_comnet.ca
>
> 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: ListGuru_at_fatcity.com (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: lvordos_at_datsit.com 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: ListGuru_at_fatcity.com (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).Received on Thu May 10 2001 - 14:22:46 CDT