Unix Pipes and Filters MCQs

Pipes and Filters MCQs : This section focuses on "Pipes and Filters" in unix. These Multiple Choice Questions (MCQ) should be practiced to improve the unix skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.

1. What is true about pipes in unix?

A. Pipe can connect two commands together so that the output from one program becomes the input of the next program
B. To make a pipe, put a hash (#) on the command line between two commands.
C. Two or more commands connected in this way form a pipe.
D. Both A and C

View Answer


2. To make a pipe, put a ________ on the command line between two commands.

A. |
B. /
C. \
D. $

View Answer


3. Which command searches a file or files for lines that have a certain pattern?

A. erep
B. pgrp
C. grep
D. drep

View Answer


4. What does -c operation do in grep command?

A. Matches either upper or lowercase.
B. Prints only the count of matching lines.
C. Prints the matched line and its line number.
D. Prints all lines that do not match pattern.

View Answer


5. Which command is used to arranges lines of text alphabetically or numerically?

A. sort
B. psort
C. asort
D. series

View Answer


6. Which option is used ignores first x fields when sorting?

A. -x
B. +x
C. -X
D. +X

View Answer


7. If there are special characters in a pattern, then we've to enclose them in ______

A. single quotes
B. double quotes
C. Without any quotes
D. None of the above

View Answer


8. POSIX identifies regular expressions as belonging to ____ categories.

A. 2
B. 3
C. 4
D. 5

View Answer


9. Which of the following is not filter in unix?

A. cat
B. head
C. tail
D. cd

View Answer


10. Which of the following filter is used to remove duplicate lines?

A. cat
B. sed
C. uniq
D. grep

View Answer





Discussion



* You must be logged in to add comment.