JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
Unix interview questions part 35
Unix interview questions part 35
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. What is the output of the following command? $ wc -c *.c
A. total size of .c files
B. size of each .c file
C. undefined
D. erroneous
Show Correct Answer
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.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
3. Which command saves one copy of character stream in a file and store the other to standard output?
A. who
B. ls
C. tee
D. wc
Show Correct Answer
Correct Answer is :
tee
4. tee is an internal command.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
FALSE
5. Which of the following is not true about tee command?
A. it is a feature of the shell
B. it is an external command
C. tee command duplicates its input
D. tee is an internal command
Show Correct Answer
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.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
7. Which of the following commands is known as stream editor?
A. sed
B. grep
C. grep
D. tr
Show Correct Answer
Correct Answer is :
sed
8. What is the correct syntax for using sed?
A. sed options file(s)
B. sed options ‘action’
C. sed options ‘address action’ file(s)
D. sed ‘action’ file(s)
Show Correct Answer
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?
A. sed -n 3 emp.lst
B. sed -i 1-3 emp.lst
C. sed ‘3q’ emp.lst
D. sed -n
Show Correct Answer
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?
A. q
B. n
C. p
D. i
Show Correct Answer
Correct Answer is :
p
11. To suppress the behavior of ‘p’ command of sed, we use ____ option.
A. -q
B. -n
C. -i
D. -v
Show Correct Answer
Correct Answer is :
-n
12. The command $ sed -n ‘$p’ emp.lst will display the last line.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
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.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
14. Which option is used with sed for using multiple instructions?
A. -f
B. -n
C. -e
D. –f and -e
Show Correct Answer
Correct Answer is :
–f and -e
15. ____ option is used for taking instructions from a file.
A. -f
B. -e
C. -i
D. -n
Show Correct Answer
Correct Answer is :
-f
16. To perform context addressing, we have to enclose the pattern in ____
A. double quotes
B. single quotes
C. / /
D. $ $
Show Correct Answer
Correct Answer is :
/ /
17. To select lines containing gupta and agarwal, which command will be used?
A. sed -n ‘/gupta/,/agarwal/p’ emp.lst
B. sed -n ‘/gupta/agarwal/p’ emp.lst
C. sed ‘/gupta | agarwal’p’ emp.lst
D. sed -n
Show Correct Answer
Correct Answer is :
sed -n ‘/gupta/,/agarwal/p’ emp.lst
18. To write selected lines, ____ is used with sed.
A. i
B. n
C. w
D. p
Show Correct Answer
Correct Answer is :
w
19. sed can also perform the substitution.
A. TRUE
B. FALSE
C.
D.
Show Correct Answer
Correct Answer is :
TRUE
20. Which one of the following is the correct syntax for performing substitution using sed?
A. sed [address]s /expr1/ expr2
B. sed [address]s /expr1 expr2
C. sed [address]s /expr1/ expr2/ flags
D. sed [address]s
Show Correct Answer
Correct Answer is :
sed [address]s /expr1/ expr2/ flags
Similar Interview Questions
Search for latest jobs
Find Jobs