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 ? | 22 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 |
What is in grep command?
why unix commands can be divided into internal and external commands?
How can we "forked" process in UNIX? How then recognize in any of the branches we?
What is a Unix signal, and how do you handle them?
What are the differences among a system call, a library function, and a unix command?
How to set sticky bit, or it have any seperate directory to create sticky bit in sunfir servers. Please help me , i don't no the exact answer?
How do you change file permissions?
how to unzip the contents of the gzip file
How do you find files in Unix?
Write a command to find all of the files which have been accessed within the last 30 days.
5 Answers Google, IBM, Satyam,
What is unix command line?
What does the metacharacter mean?