Unix Module 4 MCQ
Unix Module 4 MCQ
A. The C Shell
B. The Korn Shell
C. The Bourne Shell
D. The Perl Shell
A. Stephen R. Bourne
B. Stephen R. Korn
C. Stephen R. C.
D. Stephen Watson
A. 2
B. 3
C. 4
D. Many
A. prompt
B. command translator
C. command prompt
D. command executor
A. 2
B. 3
C. 4
D. 5
A. !
B. #
C. $
D. @
A. Korn shell
B. C shell
C. Bourne shell
D. Bash Shell
A. numbers
B. letters
C. underscore character
D. All of the above
A. Uppercase
B. Lowercase
C. First character Uppercase and all other character Lowercase
D. First character Lowercase and all other character Uppercase
A. 3
B. 4
C. 2
D. 5
13. Which of the following command is used to display the environment variables
only?
A. sh
B. set
C. env
D. var
A. 4
B. 2
C. 3
D. 5
15. We cannot use the unset command to unset variables that are marked
____________.
A. read
B. write
C. readonly
D. writeonly
A. env
B. Path
C. Home
D. User
A. Arithmetic Operators
B. Boolean Operators
C. Character operators
D. File Test Operators
19. The complete expr and awk expression should be enclosed between
___________.
A. ()
B. " "
C. ' '
D. < >
A. -eq
B. -gte
C. -ge
D. –gt
A. and
B. or
C. not
D. All of the above
22. Which of the following loops is not available in shell?
23. The _______ loop executes the given commands until the given condition
remains true.
A. For loop
B. While loop
C. until loop
D. Both B and C
24. Which of the following statements that are used to control shell loops?
A. break
B. continue
C. Both A and B
D. None of the above
25. A loop may continue forever if the required condition is not met is known as
____________.
A. finite loop
B. infinite loop
C. simple loop
D. definate loop
26. Which of the following statement is used to terminate the execution of the
entire loop?
A. continue
B. terminate
C. this
D. break
A. For loop
B. until loop
C. while loop
D. case...esac
29. Which of the following statement causes the current iteration of the loop to
exit, rather than the entire loop?
A. Continue
B. break
C. return
D. goto
A. continue
B. continue n
C. continue this
D. All of the above
Answers:
1. Ans : D
4. Ans : D
5. Ans : C
6. Ans : A
Explanation: In UNIX, there are two major types of shells : Bourne shell and
C shell.
7. Ans : C
Explanation: If we are using bourne shell on our system, then the default
prompt will be represented by $.
8. Ans : D
9. Ans : D
10. Ans : A
12. Ans : C
13. Ans : C
14. Ans : B
15. Ans : C
Explanation: We cannot use the unset command to unset variables that are
marked readonly.
16. Ans : A
17. Ans : A
18. Ans : C
19. Ans : C
Explanation: The complete expression should be enclosed between , called
the backtick.
20. Ans : C
21. Ans : D
Explanation: All the above operators are supported by the Bourne Shell.
22. Ans : D
23. Ans : B
Explanation: The while loop executes the given commands until the given
condition remains true.
24. Ans : C
Explanation: Break and continue two statements that are used to control
shell loops.
25. Ans : B
26. Ans : D
27. Ans : D
Explanation: continue is used to skip the statments and can not be used with
case...esac.
29. Ans : A
30. Ans : A