Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to replace the exact word in vi editor??
suppose a file contains words like amaze,amazed,amazement in
some of the line.But i want to replace only 'amaze' with
delight but don't wanna replace amazed or amazement.
thanks

Answer Posted / shilpi gupta

sed 's/\<amaze\>/delight/g' file_name

or

In Vi editor..you can use

:%s/\<amaze\>/delight/g

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the comma to display different lines that are found when compare two files?

1242


What's a command word?

1246


What does the metacharacter mean?

1187


What is grep and how do you use it?

1167


What does find command return in unix?

1200


What do chmod command do?

1285


Enumerate some of the most commonly used network commands in unix?

1215


Give the command for finding the current date.

1172


How do I use nslookup?

1146


What is the size of time_t?

1269


What do chown command do?

1253


Name the general commands in using unix os for a beginner?

1215


What is a command and examples?

1281


How can you see the command line history?

1185


How does shebang work?

1122