1. What is the output of the following command?
$ wc -c *.c
Correct Answer is : total size of .c files
2. In a pipeline, the command on the left of | must use standard output and one on the right must use standard input.
3. Which command saves one copy of character stream in a file and store the other to standard output?
4. tee is an internal command.
Correct Answer is : FALSE
5. Which of the following is not true about tee command?
Correct Answer is : it is a feature of the shell
6. Apart from its use in redirection, /dev/tty can also be used as an argument to some commands.
7. Which of the following commands is known as stream editor?
8. What is the correct syntax for using sed?
Correct Answer is : sed options ‘address action’ file(s)
9. Which one of the following command will be used for quitting after selecting 3 lines from file emp.lst?
Correct Answer is : sed ‘3q’ emp.lst
10. Which of the following command is used with sed for outputting as well as printing the selected lines?
11. To suppress the behavior of ‘p’ command of sed, we use ____ option.
12. The command $ sed -n ‘$p’ emp.lst will display the last line.
13. Consider the following commands.
$ sed -n ‘1,2p’ emp.lst
$ sed -n ‘3,$!p’ emp.lst
The output of both commands will be the same.
14. Which option is used with sed for using multiple instructions?
Correct Answer is : –f and -e
15. ____ option is used for taking instructions from a file.
16. To perform context addressing, we have to enclose the pattern in ____
17. To select lines containing gupta and agarwal, which command will be used?
Correct Answer is : sed -n ‘/gupta/,/agarwal/p’ emp.lst
18. To write selected lines, ____ is used with sed.
19. sed can also perform the substitution.
20. Which one of the following is the correct syntax for performing substitution using sed?
Correct Answer is : sed [address]s /expr1/ expr2/ flags