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 command will change your prompt to myprompt?

1331


What are the dos commands?

1262


What does touch command do in unix?

1427


What is command statement?

1179


How do I search for a file in unix command?

1021


What is in grep command?

1172


Why is it called grep?

1030


How to use grep command to list find the records of a file containing 10 different strings?

1129


What happens when we execute a unix command?

1143


How many unix commands are there?

1158


Which command is used to copy files?

1176


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

1162


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

1171


What is the behavioural difference between cmp and diff commands?

1287


What is the difference between grep and grep?

1137