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 various commands that are used for the user information in unix.

1094


Can you explain a little bit about command substitution?

1125


What is grep and how do you use it?

1124


What is the comma to show the space allocation of files?

1100


How do I search for a file in unix command?

1028


What is unix command?

1272


what is the advaantage of each user having its own copy of the shell?

2562


Why is shebang used?

1143


What is sed awk grep?

1145


What is unix command line?

1272


How do I delete files from command prompt?

1236


Describe the zip/unzip command using gzip.

1170


Is grep faster than awk?

1053


How to display no of records in oracle using unix command?

1181


Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?

1413