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 / majeed

First open the file by using vi editor and then

use this :%s /amaze/delight/g

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is s and g in sed command?

793


What is the significance of the 'tee' command?

820


What is the functionality of a top command?

834


What is the difference between cat command and more command?

797


How can we use grep command in unix?

839


What are the dos commands?

870


What is the behavioural difference between cmp and diff commands?

881


What command is used to switching between users in unix?

762


Explain the steps that a shell follows while processing a command.

909


What is awk command used for?

783


What is command statement?

785


What does the command ' $who | sort –logfile > newfile' do?

1026


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

811


Which unix command to make a new directory?

797


What is the use of tee command?

763