Which command is used to replace word 'cat' (already present in the file) with 'mouse' at all places in a file 'old.txt' and save the result in a new file 'new.txt'?
a) sed 's/cat/mouce/g' old.txt > new.txt
b) sed 's/cat/mouse' old.txt new.txt
c) sed '/s/cat/mouse/g' old.txt new.txt
d) sed '/s/cat/mouse' old.txt > new.txt
Submitted by: Murtazaa) sed 's/cat/mouce/g' old.txt > new.txt
Submitted by: Murtaza
Submitted by: Murtaza
Read Online Linux OS Editors Job Interview Questions And Answers
Top Linux OS Editors Questions
☺ | Which command sets the number for all lines? |
☺ | Which sed command deletes the specified address range: |
☺ | Which command shows all the abbreviations in vi editor? |
☺ | Which vi editor command copies the current line of the file? |
Top Linux OS Categories
☺ | Device Drivers Interview Questions. |
☺ | Linux OS Management Interview Questions. |
☺ | Linux Makefile Interview Questions. |
☺ | Linux Environment Interview Questions. |
☺ | Linux OS Shell Interview Questions. |