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 / chandra babu.p

s/string/string/g;
ex;

:s/unix/linux/g

Is This Answer Correct ?    5 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the general format of unix command syntax?

1384


How do you grep recursively?

787


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

860


Differentiate cat command from more command.

793


How does shebang work?

814


What does the metacharacter mean?

813


Which command is used to kill the last background job?

1024


What is “chmod” command?

763


What do chmod, chown, chgrp commands do?

912


How do I run a bash script?

826


What is s and g in sed command?

804


What are grep patterns?

779


Describe the zip/unzip command using gzip.

837


How do I delete files from command prompt?

825


What is the significance of the 'tee' command?

836