What command is used to replace the existing string with
some other?
Answers were Sorted based on User's Feedback
Answer / thangaraju
sed 's/existingstring/newstring/g' filename or Specfied
row means sed '1,10s/existingstring/newstring/g' filename
| Is This Answer Correct ? | 23 Yes | 1 No |
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 ? | 3 Yes | 0 No |
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 |
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 |
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 |
How many bits use for MAC address?
How to delete a directory containing files and folders?
what is the default permission for /etc/shadow file in UNIX
Write a command that will output the sorted contents of a file named in.txt and place the output in another file named out.txt, while at the same time excluding duplicate entries.
What is the comma to display different lines that are found when compare two files?
Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?
how will you convert a general file to a hidden file?
Why is awk called awk?
what is the default signal kill in unix?
what are processor execution levels and priorities?
Why we are using UNIX OS when we are doing the testing in our application?
What do know about tee command and its usage?