Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


What command is used to replace the existing string with
some other?

Answers were Sorted based on User's Feedback



What command is used to replace the existing string with some other?..

Answer / thangaraju

sed 's/existingstring/newstring/g' filename or Specfied
row means sed '1,10s/existingstring/newstring/g' filename

Is This Answer Correct ?    20 Yes 1 No

What command is used to replace the existing string with some other?..

Answer / jaga

:%s/string/String1/g

Is This Answer Correct ?    12 Yes 2 No

What command is used to replace the existing string with some other?..

Answer / vishu146

:1,$s/string/string1/gc

Is This Answer Correct ?    2 Yes 0 No

What command is used to replace the existing string with some other?..

Answer / suresh mishra

sed 's/existing_pattern/new_pattern/g' file_name :- It replaces "existing_pattern" with "new_pattern" GLOBALLY.If you are not providing 'g' at the end, it will only replace the first occurrence of the matching pattern.

Is This Answer Correct ?    2 Yes 0 No

What command is used to replace the existing string with some other?..

Answer / angel

sed command

Is This Answer Correct ?    2 Yes 1 No

What command is used to replace the existing string with some other?..

Answer / amit kumar

sed 's/existing_word/new_word/g' file1.txt.It replaces the
all the existing word with new word wherever it occurs in
file1.g stands for global.

Is This Answer Correct ?    1 Yes 0 No

What command is used to replace the existing string with some other?..

Answer / drishya

:g/existing word/s//new word

this s can be used while using C in linux...

Is This Answer Correct ?    1 Yes 1 No

What command is used to replace the existing string with some other?..

Answer / pavankumar

sed 's/word1/word2/g' file

it replaces all occurences of word1 with word2 in file.

Is This Answer Correct ?    1 Yes 1 No

Post New Answer



More Unix Commands Interview Questions

How to get the operating system's information in unix?

6 Answers   IBM, TCS,


Which unix command to make a new directory?

0 Answers  


how to find the 51th record of a file containing 100 records in unix.

12 Answers   IBM,


Give a regular expression that finds two things, try to come up with regular expressions that find each individually using "egrep" command?

5 Answers  


What do chmod command do?

0 Answers  






what will be the output of ls ~/..

27 Answers   ABC,


In Unix file permissions what does the second field denotes?

3 Answers  


what is shell?

3 Answers  


what is the shell for dos,nt operating systems?

1 Answers  


What are the dos commands?

0 Answers  


What is the command to find maximum memory taking process on the server?

0 Answers  


What is the use of the tee command?

0 Answers  






Categories