#
#Accept strings and replace a string by another string. 
#
echo -n "Enter String: " 
read str 
echo "Your string is :" $str 
echo -n "Enter word that you want to replace with other word: " 
read oldstr 
echo -n "Enter new word: " 
read newstr 
str=`echo $str | sed s/$oldstr/$newstr/g` 
echo "After Replacing: " $str 