Subscribe to Get Free Material Updates!
Visit my new blog WebData Scraping - Web Scraping Service provider company in India.

Shell script that 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"


Output:

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes