Linux OS Editors Question:

The command "sed -n '/google/p' old.txt" will:
a) print the lines containing the word 'google' in file old.txt
b) delete the lines containing the word 'google' in file old.txt
c) will generate an error message
d) none of the mentioned

Linux Editors Interview Question
Linux Editors Interview Question

Answer:

a) print the lines containing the word 'google' in file old.txt


Previous QuestionNext Question
Which option is used by sed to specify that the following string is an instruction or set of instructions?
a) -n
b) -e
c) -f
d) -i
Which command will delete all the blank lines in file old.txt?
a) sed '/d' old.txt
b) sed '/^/d' old.txt
c) sed '/^$/d' old.txt
d) sed '/^*/d' old.txt