Re: Filename conversion to uppercase

From: Bill Thompson (bill.thompson@GOODYEAR.COM)
Date: Sat May 01 2004 - 11:19:03 EDT


Here's one way (there are many):

- - - - - snip - - - - -
#!/bin/sh

typeset -u UPPER

for FILE in $@; do
    UPPER=$FILE
    mv $FILE $UPPER
done
- - - - - snip - - - - -

Of course you may want to do some checking along the way, but that's the basic idea.

Bill Thompson
Sr UNIX Systems Administrator
The Goodyear Tire & Rubber Co.

Contains Confidential and/or Proprietary Information
May Not Be Copied or Disseminated Without Express Consent of The Goodyear Tire & Rubber Company.

AIX-L Archives: http://marc.theaimsgroup.com/?l=aix-l&r=1&w=2

----- Original Message -----
From: <faisalq@CYBER.NET.PK>
Newsgroups: bit.listserv.aix-l
To: <aix-l@Princeton.EDU>
Sent: Friday, April 30, 2004 9:01 AM
Subject: Filename conversion to uppercase

> Dear all,
>
> We need to write a script to convert filenames to uppercase. How can that be
> done?
>
> For e.g. abc.txt needs to be renamed to ABC.TXT
>
> Regards
>
>
>
> --1083390016@njilife.com--
>



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:53 EDT