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 the comma to display different lines that are found when compare two files?
What's a command word?
What does the metacharacter mean?
What is grep and how do you use it?
What does find command return in unix?
What do chmod command do?
Enumerate some of the most commonly used network commands in unix?
Give the command for finding the current date.
How do I use nslookup?
What is the size of time_t?
What do chown command do?
Name the general commands in using unix os for a beginner?
What is a command and examples?
How can you see the command line history?
How does shebang work?