Explore topic-wise MCQs in Unix.

This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.

1.

Which of the following symbols are used for matching multiple patterns?

A. |
B. &
C. ( and )
D. | and ( and )
Answer» D. | and ( and )
2.

Which option is used when we want to use an ERE with grep command?

A. -e
B. -i
C. -E
D. -i
Answer» D. -i
3.

Which of the following symbols are a set of ERE (extended regular expressions)?

A. +
B.
C. ?
D. + and –
Answer» E.
4.

The following command will match the lines beginning with ‘2’.

A. True
B. FalseView Answer
Answer» B. FalseView Answer
5.

Which of the following symbols are used for matching a pattern at specified locations?

A. *
B. ^
C. $
D. ^ and $
Answer» E.
6.

Which symbol is used for matching a single character?

A. *
B. .
C. &
D. %
Answer» C. &
7.

Which of the following symbol is used for matching the immediately preceding character?

A. *
B. $
C. [ ]          
D. %
Answer» B. $
8.

The following command will match ‘Agarwal’, ‘agarwal’ and ‘agrawal’.

A. True
B. FalseView Answer
Answer» B. FalseView Answer
9.

Character class is used for matching a group of characters enclosed within a pair of _____

A. ( )
B. “ “
C. [ ]           
D. { }
Answer» D. { }
10.

Which of the following is not a subset of BRE (basic regular expression) character subset?

A. *
B. .*
C. ^$
D. ch+
Answer» E.