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 / kranthi kumar

:1,$s/amaze$/amazing/g

this will be changed only amaze in totalvi editor....

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is “chmod” command?

568


Why is grep called grep?

783


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

630


How does the system know where one command ends and another begins?

1582


What is command substitution?

627






What do chmod, chown, chgrp commands do?

641


What does awk stand for?

615


How do you grep a case insensitive?

545


Why is shebang used?

600


What are file commands?

656


Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.

628


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

562


What is the difference between cat command and more command?

601


What is the difference between awk and grep?

561


How do I search a whole word in vim?

694