Wednesday, 22 February 2012
Accept strings and replace a string by another string.
clear
echo "Enter string"
read str
echo "Enter string to search"
read sstr
echo "Enter string to replace"
read rstr
str=`echo $str | sed s/$sstr/$rstr/`
echo "string replaced successfully and string is $str"
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment