Given x=10 then, The given statement is ____
1.True
2. False
3.all of the above
4.None of the mentioned
In UNIX there are ___ major types of shells.
1.2
2.3
3.4
4.many
On a UNIX system, there can be ____ shells running simultaneously.
1. 1
2.2
3.many
4. 4
Shell scripts need to be saved with an extension .sh .
1.True
2.False
3.all of the above
4.None of the mentioned
The ____ allows us to read data from the same file containing the script.
1.>>
2. <<
3.!!
4.—
The first argument is read by the shell into the parameter ___
1.1$
2.$3
3.$$
4.$1
The prompt issued by the shell is called ______
1.prompt
2.command translator
3. command prompt
4.command executor
We can use the here document with interactive programs also.
1.True
2. False
3.all of the above
4.None of the mentioned
What is the default symbol for command prompt in C shell?
1. $
2.%
3. #
4.@a = split(/s/, $str).
Where is the exit status of a command stored?
1.$0
2. $>
3.$1
4. $?
Which command is used for changing filename extensions?
1.chown
2.rename
3.basename
4.rm
Which of the following is false?
1.here document provides standard input to any script non interactively
2.read command is used for making scripts interactive
3.$* stores the number of arguments specified
4.&& and || are logical operators
Which of the following loop statements uses do and done keyword?
1. for
2.while
3.case
4.for and while
___ option is used with a test for checking if the file exists and has the size greater than zero.
1. -f
2. -r
3.-e
4. -s
____ command is the appropriate way to interrupt a program.
1. kill
2.SIGKILL
3. INT
4. trap
____ statement is used for shifting arguments left.
1. set
2. shift
3.cut
4. paste
A shell script stopped running when we change its name. Why?
1. location of the file changed
2. we can’t change the name of the script
3. $0 was used in the script
4. many possible reasons
A single read statement can be used with one or more variables.
1. True
2.False
3.all of the above
4.None of the mentioned
Any command using standard input can take the input from here document.
1.True
2.False
3.all of the above
4.None of the mentioned
Every time shift command is used, the leftmost variable is lost.
1.True
2.False
3.all of the above
4.None of the mentioned
In Shell’s interpretive cycle, the shell first scans for ____ in the entered command.
1.characters
2. priority
3.meta-characters
4.wildcards
read command is shell’s internal tool.
1.True
2.False
3.all of the above
4.None of the mentioned
Shell provides us with an interface to the operating system.
1.True
2.False
3.all of the above
4.None of the mentioned
Shell scripts are executed in a separate child shell process.
1. True
2. False
3.all of the above
4.None of the mentioned
Suppose x =10, then what will be the value of x$x$?
1.undefined
2.erroneous
3.100
4.x10$
test statement cannot ______
1.compare two numbers
2.compare two strings
3.compare two files
4.check a file’s attributes
The complete set of positional parameters is stored in ______ as a single string.
1. $n
2.$#
3. $*
4.$$
The first line in any shell script begins with a _____
1. &
2. !
3.$
4. #
The shell waits for the command to complete and normally can’t do any work while the command is executing.
1.True
2. False
3.all of the above
4.None of the mentioned
There can be multiple kernels on a single UNIX system.
1.True
2.FALSE
3.all of the above
4.None of the mentioned
To run the script, we should make it executable first by using _____
1.chmod +x
2.chmod +r
3.chmod +w
4.chmod +rwx
To spawn a child of our own choice for running the script, we can use ___ command.
1.ps
2.pr
3.sh
4.$$
until loop operates with a reverse logic as used in while loop.
1.True
2.False
3.all of the above
4.None of the mentioned
What are positional parameters?
1. special variables for assigning arguments from the command line
2. pattern matching parameters
3.special variables for reading user input
4.special variables and patterns
What is a shell script?
1.group of commands
2.a file containing special symbols
3. a file containing a series of commands
4.group of functions
What is the default symbol for command prompt in Bourne shell?
1. $
2.%
3.#
4. @
Which command does not terminates unless we log out of the system?
1.history
2.shell
3.echo
4.login
Which command is used by the shell for manipulating positional parameters?
1.set
2. cut
3.case
4. paste
Which command is used for making the scripts interactive?
1.ip
2.input
3.read
4.Write (append)
Which of the following command doesn’t accept a filename as an argument?
1. cut
2.ls
3.paste
4.mailx
Which of the following commands let us perform a set of instructions repeatedly?
1.for
2.while
3.until
4. for, while, until
Which of the following expression is a correct wildcard pattern if we want an expression in which the last character is not numeric?
1. *[!0]
2. *[0-9]
3.[0-9]
4.*[!0-9]
Which of the following is used for storing the number of positional parameters?
1.$n
2.$#
3. $*
4.$2
Which of the following keywords are used in while loop?
1. do
2.done
3.then
4.do and done
Which of the following option is used with a set for debugging shell scripts?
1.-a
2.-x
3.-d
4.-e
Which one of the following command will display the name of the shell we are working on?
1.echo shell
2.echo $
3. echo $SHELL
4.echo $$
Which one of the following is an internal command?
1.cut
2.expr
3. set
4.isMaster
Which one of the following is used for looping with a list?
1.while
2.until
3.case
4.for
Which shell is the most common and best to use?
1.Korn shell
2.POSIX shell
3. C shell
4. Bash shell
Which symbol is used with the set command for command substitution?
1. –
2. —
3. ??
4. _