

MCQOPTIONS
Saved Bookmarks
This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Unix knowledge and support exam preparation. Choose a topic below to get started.
1. |
To know the exit status of a command, we can use ____ |
A. | $$ |
B. | $* |
C. | $? |
D. | $- |
Answer» D. $- | |
2. |
Which of the following is not a special parameter used by the shell? |
A. | $$ |
B. | $* |
C. | $? |
D. | $- |
Answer» E. | |
3. |
WHICH_OF_THE_FOLLOWING_IS_NOT_A_SPECIAL_PARAMETER_USED_BY_THE_SHELL??$ |
A. | $$ |
B. | $* |
C. | $? |
D. | $- |
Answer» E. | |
4. |
To know the exit status of a command, we can use ____$ |
A. | $$ |
B. | $* |
C. | $? |
D. | $- |
Answer» D. $- | |
5. |
The name of the script is stored in which special parameter? |
A. | $1 |
B. | $0 |
C. | $ |
D. | $* |
Answer» C. $ | |
6. |
To check more than two conditions, ___ is used with if-else statements. |
A. | while |
B. | for |
C. | elif |
D. | for |
Answer» D. for | |
7. |
Every if is closed with a corresponding ____ |
A. | else |
B. | fi |
C. | if |
D. | else if |
Answer» C. if | |
8. |
To perform decision depending on the fulfillment of certain criteria, ____ is used. |
A. | if |
B. | else |
C. | for |
D. | if and else |
Answer» E. | |
9. |
The syntax for using && is ______________ |
A. | cmd1 && cmd2 |
B. | cmd1 cmd2 && |
C. | cmd1 & cmd2& |
D. | cmd1 |
Answer» B. cmd1 cmd2 && | |
10. |
When we use ||, both the commands are executed. |
A. | True |
B. | False |
Answer» C. | |
11. |
When we use &&, the second command is executed only when first succeeds. |
A. | True |
B. | False |
Answer» B. False | |
12. |
Which of the following operators are used for logical execution? |
A. | || |
B. | && |
C. | %% |
D. | && and || |
Answer» E. | |