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

How do I run a bash script?

1112


Explain ‘system calls’ with respect to unix commands?

1038


How do I search a whole word in vim?

1126


What is the nmap command?

1120


How does pipe () work?

1040


What is awk command used for?

1125


What is the functionality of a top command?

1050


Why is grep called grep?

1231


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

1511


Why is it called a shebang?

1089


Does cp command overwrite files?

1133


What is grep short for?

997


What is the use of find command in unix?

1073


What is sed awk grep?

1071


Name the unix command to find how many days the server has been up.

1111