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 various commands that are used for the user information in unix.
Can you explain a little bit about command substitution?
What is grep and how do you use it?
What is the comma to show the space allocation of files?
How do I search for a file in unix command?
What is unix command?
what is the advaantage of each user having its own copy of the shell?
Why is shebang used?
What is sed awk grep?
What is unix command line?
How do I delete files from command prompt?
Describe the zip/unzip command using gzip.
Is grep faster than awk?
How to display no of records in oracle using unix command?
Is there a way to erase all files in the current directory, including all its sub-directories, using only one command?