NEW
Font size
WorksheetsLINUX MODULE 03 QUIZ
Total questions: 10
Worksheet time: 3mins
What is a shell in Linux?
Hardware interface
Software kernel
Command interpreter
Text editor
Which of the following is the default shell in most Linux distributions?
Bourne Again Shell (bash)
C shell (csh)
Bourne shell (sh)
Korn shell (ksh)
Which of the following is the correct syntax for an if statement in bash?
if [ condition ]; then
if condition: then
if (condition); then
if {condition}; then
Which of the following symbol is used to comment a line in shell scripts?
//
/* */
#
%%
What file extension is typically used for shell scripts?
.sh
.bash
.txt
.shell
What will the following script output?
i=5
while [ $i -gt 0 ]; do
echo $i
i=$((i-1))
done
5 4 3 2 1
1 2 3 4 5
Infinite loop
Error in syntax
How do you access the first argument passed to a shell script?
$arg1
$1
$first
$0
Which of the following is a scripting language for shell programming?
Python
Bash
Java
HTML
What does ksh stand for?
Korn Shell
Kernel Shell
Key Shell
Kermit Shell
What does the command echo $0 display in a script?
The current shell
The name of the script
The first argument passed
The last command executed
