1. The positional parameters are______
(A) special variables and patterns
(B) pattern matching parameters
(C) special variables to read user input
(D) From the command lines, the special variables for assigning arguments
2. The shell script is___
(A) File containing a series of commands
(B) File containing special symbols
(C) group of commands
(D) group of functions
3. For storing the number of positional parameters, what is used?
(A) $n
(B) $*
(C) $#
(D) $2
4. To make the scripts interactive, the ________ command is used.
(A) ip
(B) input
(C) write
(D) read
5. The internal tool of a shell is the read command.
(A) False
(B) True
(E) None of these
Answer: (B) True
6. With one or more variables single read statement is used.
(A) True
(B) False
(E) None of these
Answer: (A) True
7. With an extension .sh the shell scripts are saved.
(A) False
(B) True
(E) None of these
Answer: (A) False
8. In the separate child shell process, the shell script executes.
(A) True
(B) False
(E) None of these
Answer: (A) True
9. With ____ first line of every shell script begins.
(A) &
(B) #
(C) $
(D) !
10. By shell into the parameter, __ reads the first argument
(A) $1
(B) $3
(C) $$
(D) 1$
11. In ____ as a single string, a complete set of the positional parameters is stored.
(A) $*
(B) $#
(C) $n
(D) $$
12. We have to make it executable first by using ___, to run a script
(A) chmod +w
(B) chmod +r
(C) chmod +x
(D) chmod +rwx
13. ____command is used to spawn a child of our own choice for running a script.
(A) sh
(B) pr
(C) ps
(D) $$
14. For looping with a list what is used?
(A) for
(B) until
(C) case
(D) while
15. To shift arguments left we use ____ statement.
(A) set
(B) paste
(C) cut
(D) shift
16. For reading data from the same file containing the script, _______allows us.
>” onclick=”checkAnswer(‘q16’, ‘<<')"> (A) >>
(B) —
(C) !!
(D) <<
17. Any of the commands using standard input takes the input from here document.
(A) False
(B) True
(E) None of these
Answer: (B) True
18. The loop is a while loop until the loop operates with reverse logic.
(A) False
(B) True
(E) None of these
Answer: (B) True
19. The internal command in the following is_______
(A) set
(B) expr
(C) cut
(D) Is
20. A filename is not accepted as an argument by which command?
(A) mailx
(B) ls
(C) paste
(D) cut
21. do and the done keyword is used by which loop statements?
(A) for
(B) while
(C) for and while
(D) case
22. with interactive programs, the here document can also be used.
(A) True
(B) False
(E) None of these
Answer: (A) True
23. The program is interrupted by_________ command in appropriate way.
(A) kill
(B) SIGKILL
(C) trap
(D) INT
24. To perform a set of instructions repeatedly, Which commands are used?
(A) for
(B) for, while, until
(C) until
(D) while
25. To change filename extensions, which command do we use?
(A) chown
(B) rename
(C) rm
(D) basename
26. To manipulate positional parameters the shell uses which command?
(A) cut
(B) set
(C) case
(D) paste
27. In while loop which keywords are used?
(A) do and done
(B) done
(C) then
(D) do
28. For command substitution, with the set command which of the following symbol is used?
(A) –
(B) ??
(C) —
(D) _
