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 command will change your prompt to myprompt?
What are the dos commands?
What does touch command do in unix?
What is command statement?
How do I search for a file in unix command?
What is in grep command?
Why is it called grep?
How to use grep command to list find the records of a file containing 10 different strings?
What happens when we execute a unix command?
How many unix commands are there?
Which command is used to copy files?
What is the comma to display different lines that are found when compare two files?
Enumerate some of the most commonly used network commands in unix?
What is the behavioural difference between cmp and diff commands?
What is the difference between grep and grep?