Q.1
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
Q.2
Shell scripts need to be saved with an extension .sh .
  • a) True
  • b) False
Q.3
Shell scripts are executed in a separate child shell process.
  • a) True
  • b) False
Q.4
The first line in any shell script begins with a _____
  • a) &
  • b) !
  • c) $
  • d) #
Q.5
To run the script, we should make it executable first by using _____
  • a) chmod +x
  • b) chmod +r
  • c) chmod +w
  • d) chmod +rwx
Q.6
To spawn a child of our own choice for running the script, we can use ___ command.
  • a) ps
  • b) pr
  • c) sh
  • d) $$
Q.7
Which command is used for making the scripts interactive?
  • a) ip
  • b) input
  • c) read
  • d) write
Q.8
read command is shell’s internal tool.
  • a) True
  • b) False
Q.9
A single read statement can be used with one or more variables.
  • a) True
  • b) False
Q.10
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
Q.11
The first argument is read by the shell into the parameter ___
  • a) 1$
  • b) $3
  • c) $$
  • d) $1
Q.12
The complete set of positional parameters is stored in ______ as a single string.
  • a) $n
  • b) $#
  • c) $*
  • d) $$
Q.13
Which of the following is used for storing the number of positional parameters?
  • a) $n
  • b) $#
  • c) $*
  • d) $2
0 h : 0 m : 1 s