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
Name the general commands in using unix os for a beginner?
Describe the usage and functionality of the command rm –r * in unix?
What happens when we execute a unix command?
What is rmdir command?
What does find command return in unix?
Write a command to display a file’s contents in various formats?
Is command prompt unix?
What are filter commands in unix?
Differentiate cmp command from diff command.
Which command will print your home directory on screen?
What is the size of time_t?
why metadb requires a seperate slice to create Solaris volume manager
What does 'mkdir' command do in UNIX?
What is the use of tee command?
What does touch command do in unix?