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

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

1220


Describe the usage and functionality of the command rm –r * in unix?

2185


What happens when we execute a unix command?

1205


What is rmdir command?

1155


What does find command return in unix?

1204


Write a command to display a file’s contents in various formats?

1252


Is command prompt unix?

1225


What are filter commands in unix?

1261


Differentiate cmp command from diff command.

1237


Which command will print your home directory on screen?

1155


What is the size of time_t?

1272


why metadb requires a seperate slice to create Solaris volume manager

3253


What does 'mkdir' command do in UNIX?

1376


What is the use of tee command?

1239


What does touch command do in unix?

1482