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
How do I run a bash script?
Explain ‘system calls’ with respect to unix commands?
How do I search a whole word in vim?
What is the nmap command?
How does pipe () work?
What is awk command used for?
What is the functionality of a top command?
Why is grep called grep?
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)?
Why is it called a shebang?
Does cp command overwrite files?
What is grep short for?
What is the use of find command in unix?
What is sed awk grep?
Name the unix command to find how many days the server has been up.