On Thu, Dec 13, 2001 at 09:33:42AM -0800, Yogesh Dhond wrote:
> 
> 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
> 

Sorry, I deleted all old mail, and gave a script for just
converting filenames to upper. For the kind of thing  you
are  looking for, this will do it:


---------------<snip>----------------
#!/bin/sh
# save as to-upper. chmod +x to-upper

LOWER=$1
TEMP_FILE=/tmp/to-upper

if [ $1 ]; then
   cat $LOWER | tr -t [:lower:] [:upper:] > $TEMP_FILE
   mv $LOWER $LOWER.bak
   cp $TEMP_FILE $LOWER
   rm -f $TEMP_FILE
else
   echo "Usage : to-upper <filename.txt>"
fi      
exit
---------------<snip>----------------


> 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 ;-)
> 

Pl. have some consideration for non-English speaking folk on
the net. This has been a sore point in several lists ...

Bish

--
:
####[ Linux One Stanza Tip (LOST) ]###########################
  
Sub : Using Aliases (csh shell/ clones)              LOST #177

You can use aliases to  decrease the amount of typing you need 
to do to get commands you commonly use. You can  place them in 
your startup file (.login) as well. Under csh and tcsh: 

alias lf ls -FA
alias ll ls -lA

####<From : freebsd fortune>##################################
:

_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help

Reply via email to