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 use of the command 'ls -x chapter[1-5]' ?
How do I run a whois command?
Enumerate some of the most commonly used network commands in unix?
What are the general commands in using unix os for a beginner?
What is grep r?
Who command in unix?
Which command is used to find whether the system is 32 bit or 64 bit?
What is the pipe command?
What is a command and examples?
How is the command '$cat file2 ' different from '$cat >file2 and >> redirection operators ?
What is the function of grep command in unix?
Using unix command how to display no of records in oracle?
How to find $ai_serual resolved path by using unix
What is in grep command?
What command will change your prompt to myprompt?