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 |
What is the comma to show the space allocation of files?
Which command is used to kill the last background job?
what are wild cards?
What is the first character of the output in ls l command?
Write a command that will allow a unix system to shut down in 15 minutes, after which it will perform a reboot.
what are the different operating systems available?
What does 'mkdir' command do in UNIX?
Which command can you use to find the currently running process in unix server?
how to change a normal file into hidden file
What is shrinking file system in AIX where it actually resides?
use of ls command
How do I use nslookup?