

MCQOPTIONS
Saved Bookmarks
This section includes 13 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 is used for storing the number of positional parameters? |
A. | $n |
B. | $# |
C. | $* |
D. | $2 |
Answer» C. $* | |
2. |
The complete set of positional parameters is stored in ______ as a single string. |
A. | $n |
B. | $# |
C. | $* |
D. | $$ |
Answer» D. $$ | |
3. |
The first argument is read by the shell into the parameter ___ |
A. | 1$ |
B. | $3 |
C. | $$ |
D. | $1 |
Answer» E. | |
4. |
What are positional parameters? |
A. | special variables for assigning arguments from the command line |
B. | pattern matching parameters |
C. | special variables for reading user input |
D. | special variables and patterns |
Answer» B. pattern matching parameters | |
5. |
A single read statement can be used with one or more variables. |
A. | True |
B. | False |
Answer» B. False | |
6. |
read command is shell s internal tool. |
A. | True |
B. | False |
Answer» B. False | |
7. |
Which command is used for making the scripts interactive? |
A. | ip |
B. | input |
C. | read |
D. | write |
Answer» D. write | |
8. |
To spawn a child of our own choice for running the script, we can use ___ command. |
A. | ps |
B. | pr |
C. | sh |
D. | $$ |
Answer» D. $$ | |
9. |
To run the script, we should make it executable first by using _____ |
A. | chmod +x |
B. | chmod +r |
C. | chmod +w |
D. | chmod +rwx |
Answer» B. chmod +r | |
10. |
The first line in any shell script begins with a _____ |
A. | & |
B. | ! |
C. | $ |
D. | # |
Answer» E. | |
11. |
Shell scripts are executed in a separate child shell process. |
A. | True |
B. | False |
Answer» B. False | |
12. |
Shell scripts need to be saved with an extension .sh . |
A. | True |
B. | False |
Answer» C. | |
13. |
What is a shell script? |
A. | group of commands |
B. | a file containing special symbols |
C. | a file containing a series of commands |
D. | group of functions |
Answer» D. group of functions | |