MCQs Computer Systems Analyst
1. Use of what is recommended by POSIX instead of archaic command
for command substitution?
(A). |
(B). $
(C). %
(D). #
(E). None of these
Multiple Choice Question Answer: b
2. Using $ recommended by POSIX, which shell doesn’t support the command substitution?
(A). Korn
(B). bash
(C). bourne
(D). C
(E). None of these
Multiple Choice Question Answer: c
3. By using what a variable can be removed?
(A). bash
(B). read-only
(C). del
(D). unset
(E). None of these
Multiple Choice Question Answer: d
4. When we evaluate the following statement What will be the result?
$ directory=’pwd’=pwd
(A). erroneous
(B). undefined output
(C). the output of a pwd command along with string pwd=
(D). the directory variable will hold the string pwd
(E). None of these
Multiple Choice Question Answer: c
5. To protect a variable from reassignment we can use read-only command.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
6. Which command is used by C shell to assign the values to variables?
(A). =
(B). unset
(C). set
(D). $
(E). None of these
Multiple Choice Question Answer: c
7. The variable assignment as x = 10 will work if we don’t use the C shell.
(A). False
(B). True
(C). Partially True
Multiple Choice Question Answer: a
8. What is not a system-defined variable?
(A). $cd
(B). $HOME
(C). $SHELL
(D). $PATH
(E). None of these
Multiple Choice Question Answer: a
9. An invalid variable is ____
(A). _user
(B). -txtfile
(C). us01
(D). txt123
(E). None of these
Multiple Choice Question Answer: b
10. The command substitution requires the command to use what?
(A). standard output
(B). standard input
(C). standard error
(D). all of the mentioned
(E). None of these
Multiple Choice Question Answer: a
11. The following command is valid.
$ ls -lRa $HOME > home.ls
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: a
12. To assign the value to the variables which symbol do we use?
(A). $
(B). =
(C). &
(D). @
(E). None of these
Multiple Choice Question Answer: b
13. For the evaluation of variables which symbol do we use?
(A). @
(B). &
(C). =
(D). $
(E). None of these
Multiple Choice Question Answer: d
14. What is the correct initialization of variables to the null strings?
(A). x=
(B). x=, x=’ ‘, x=” “
(C). x=” “
(D). x=’ ‘
(E). None of these
Multiple Choice Question Answer: b
15. One or more arguments to be obtained from the standard output of another command enabled by Shell. What is this feature called?
(A). korn
(B). argument substitution
(C). shell substitution
(D). command substitution
(E). None of these
Multiple Choice Question Answer: d
16. In command substitution, which meta-character is used?
(A). “
(B). ‘
(C). `
(D). >
(E). None of these
Multiple Choice Question Answer: c
17.The Command substitution is also enabled in the single quote.
(A). True
(B). False
(C). Partially True
Multiple Choice Question Answer: b