On Tue, Dec 11, 2001 at 09:39:14AM -0800, Yogesh Dhond wrote:
>
> no it is possible with "tr" command...but have 2 thnk a lot
>
> >
> > Was that translate all files or translate display of ls ?
> > Translating all file names to uppercase would require mv
> > command.. and I am not too sure it could be done without
> > a for in shell..
> >
> > Shridhar
> >
---end quoted text---
Yogi, In this case, Shridhar is quite right . If you need to
convert filenames from lower to upper in a dir, you would
need a script ... "tr" is well suited for the conversion job
(as well as sed), but not in a position to rewrite the file
in upper case within the same directory. For this "mv" would
be needed. A script to this effect is placed below:
------------<snip>-----------
#!/bin/sh
for i in `ls *.txt`; do
NEWFNAME=`echo $i | tr -t [:lower:] [:upper:]`
mv $i $NEWFNAME
done
-----------</snip>-----------
Please note the space between [:upper:] and [:lower:] for it
to be identified as two strings under 'tr'.
Secondly, kindly avoid using unauthorised abbreviations in
your mail, beyond what is there in the Hacker's Jargon.
HTH
Bish
--
:
####[ Linux One Stanza Tip (LOST) ]###########################
Sub : dbx/ mbx to mbox conversion LOST #185
It is difficult converting mails gathered over M$ proprietory
format ins OE to mbox commonly used by *nix mailers. The URLs
below cater for some such utilities:
o http://sourceforge.net/projects/ol2mbox/
o http://mbx2mbox.sourceforge.net/
####<[EMAIL PROTECTED]>################################
:
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help