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 |
If we want to see first 35 lines of a file which command we have to use?
What is the general format of unix command syntax?
What is an Unix command to convert HEX value to ASCII value located in any flat file.
distinguish between multi-tasking,multi-user,multi- processing and time sharing?
4 Answers Infosys, Nikhil Construction,
Can a process kill itself in UNIX/or in its various versions?
What is the syntax of grep command and what is its use?
Enumerate some of the most commonly used network commands in unix?
What is awk used for?
1-how will you display a file whose name is starting with '- '? 2-how will you add a patten at end of every line in vi editor?
Assume the following files are in the working directory prompt> ls -l tasks -rw-r--r-- 1 alex student 1423 Feb 21 14:01 tasks What command can Alex use to give everyone permission to write to the file? What will the ls -l command display if he does so?
What does touch command do in unix?
What is the use of tee command?