a) yy
Explanation:
The command 'p' puts the copied text after the cursor.
2. Which command is used to close the vi editor?
a) q
b) wq
c) both (a) and (b)
d) none of the mentioned
c) both (a) and (b)
Explanation:
The command 'q' just closes the file and 'wq' saves and closes the file.
b) vi editor commands are not case sensitive
a) moves screen down one page
b) autoindentation can be set using the command ':set ai'
9. Which command shows all the abbreviations in vi editor?
a) ab
b) abb
c) show
d) none of the mentioned
a) ab
a) sed [options] '[command]' [filename]
13. What is sed?
a) a non-interactive stream editor
b) an IDE
c) a hex editor
d) none of the mentioned
a) a non-interactive stream editor
b) save the data for later retrieval
Explanation:
To copy the each line of input, sed maintains the pattern space.
b) sed reads from standard input
c) [address range]/d
a) sed 's/cat/mouce/g' old.txt > new.txt
c) sed '/^$/d' old.txt
a) print the lines containing the word 'google' in file old.txt