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 behavioural difference between cmp and diff commands?
Write a command that will display files in the current directory, in a colored, long format.
how to remotely move a file ??? that mean how to move a file one machine to another machine ???
distinguish between physical addresses and logical address?
solaris Run level?
What is the difference between udp and tcp?
What do know about tee command and its usage?
What is mtime in find command?
How to get the last ten lines of a file using awk utility?
How does the system know where one command ends and another begins?
How to check whether some services are running in another server or not? Suppose i am currently in a server named A.I want to check whether some services are running in server B without logging into the server B.
3 Answers Amazon, MBA, Syntel, TCS, Unisys,
What do chown command do?