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
What is a bash command?
What does the md command do?
Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?
What is the comma to display different lines that are found when compare two files?
Is command prompt unix?
What do chgrp command do?
What are the general commands in using unix os for a beginner?
Does cp command overwrite files?
What are the commands in UNIX to list the files in a Directory?
How do I delete files from command prompt?
What is .sh file?
What is the difference between awk and grep?
Which command is used to restrict incoming messages?
What's a command word?
What is the first character of the output in ls l command?