My problem is to convert all the contents of files from lower case to upper case and save it in same file. i was able to display the file contents in uppercase format but was not able 2 save in same file
i didnt try ur script...as i wanted only the command last regd the jargon..thiz r upcoming ...& u shud provide a path for them ;-) yogi On Wed, 12 Dec 2001, USM Bish wrote: > 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 > yogi _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Never fear shadows. They simply mean there's a light shining somewhere nearby. _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ _______________________________________________ linux-india-help mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/linux-india-help
