How to find and replace the below command?

Answers were Sorted based on User's Feedback



How to find and replace the below command? ..

Answer / muralidharan

In a vi mode

:%s/searchword/replacaceword/g

Is This Answer Correct ?    17 Yes 0 No

How to find and replace the below command? ..

Answer / pavithra

Using sed command:

sed 's/searchword/replaceword/g' filename --[It finds the
word in file and replaces and displays in the command line]

sed -i '/s/searchword/replaceword/g' filename -- [It edits
the file, finds and replaces the word and saves it and next
time when u open the file it displays the file with replaced
word]

Is This Answer Correct ?    8 Yes 1 No

Post New Answer

More Unix Commands Interview Questions

What is the difference between grep and grep?

0 Answers  


What is the search command in unix?

0 Answers  


How do you remove a crontab file?

6 Answers  


What is the use of awk command in unix?

0 Answers  


Name the various commands that are used for the user information in unix.

0 Answers  






Which unix command to make a new directory?

0 Answers  


What is awk used for?

0 Answers  


How do you find out all processes that are currently running in UNIX OS?

10 Answers  


distinguish between physical addresses and logical address?

3 Answers   Infosys,


solaris Run level?

3 Answers   Wipro,


What is the different between UNIX command and UNIX shell script?

2 Answers  


What is .sh file?

0 Answers  


Categories