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

How do I use nslookup?

0 Answers  


Explain command to view process running?

0 Answers  


what is the use of wild cards?

2 Answers  


By using which command we can find the CPU utilization time?

7 Answers   Amazon,


What is the difference between cat and more command?

0 Answers  






What are the differences among a system call, a library function, and a unix command?

0 Answers  


How to convert a hidden file to normal visible file?

8 Answers  


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

10 Answers  


In vi editor how do you execute unix commands?

10 Answers  


what is the command to find out the difference between files and folders?

6 Answers  


how to remotely move a file ??? that mean how to move a file one machine to another machine ???

10 Answers   Altair,


what is the command to list all files in a directory, including the hidden files in UNIX ?

9 Answers   CTS,


Categories