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
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / kranthi kumar
:1,$s/amaze$/amazing/g
this will be changed only amaze in totalvi editor....
| Is This Answer Correct ? | 2 Yes | 3 No |
which command is used to stop a running process in unix?
How do you know about running processes of a particular user?
What is difference between grep and find command in unix?
How do you repeat a command in terminal?
How does pipe () work?
What do chgrp command do?
how to find largest file?
14 Answers HCL, Microsoft, Thomson Reuters,
If JFS file system is 100% full how we can increase the file system ?
when we installing aix os the ssh installed default?
what is the command to print last 8 lines of any text file.
What is the use of find command in unix?
How do you grep a case insensitive?