This Shell Scripting quiz assesses knowledge on various shell commands and scripting techniques. Topics include shell environments, script parameters, and command execution status. It's ideal for learners aiming to enhance their scripting skills for better automation and system management.
$? will return exit status of command .0 if command gets successfully executed ,non-zero if command failed.
$? will return exit status of command .Non-0 if command gets successfully executed ,zero if command failed.
System error
Invalid command
Rate this question:
Will return no of error
Will return the number of parameters that are passed as the command-line arguments
Error
None of the above
Rate this question:
Its mainly used for showing up all params. This show few parameter values passed in shell script
Its mainly used for showing up all params. This show all values returned
Its mainly used for showing up all params. This show all parameter values passed in shell script
None of the above
Rate this question:
Whomami
Pwd
Echo $SHELL
$sh
Rate this question:
Easily available
Standard and portable
Easy to use
Available on all the system
Rate this question:
By reading keyboard data entered by a user
By using the output of another program as input
By using a file’s contents as input
All of the above
Rate this question:
/etc/passwd
/etc/login
/etc/hosts
/etc/profile
Rate this question:
It’s passed down from the script’s parent shell
It’s passed up from the script’s child shell
It’s read by the script from the /etc/profile file
It’s read by the script from the .profile file.
Rate this question:
The Korn Shell
The Bourne shell
The C shell
The bash shell
Rate this question:
Single
Double
Back quote
None of the above
Rate this question:
Eval echo \$name `echo last`
Eval ‘$name’ `echo last`
Echo “$name” $namelast
Both eval echo \$name `echo last` & eval ‘$name’ `echo last`
Rate this question:
Ls –l myFile.txt; echo $?
Ls –l myFile.txt; echo $#
Ls –l myFile.txt; echo $$
Ls –l myFile.txt; echo $*
Rate this question:
Sed –i '^ d' file.txt
Sed –i '$ d' file.txt
Sed –i '$ p' file.txt
Sed –i '$ c' file.txt
Rate this question:
Sort
Sh
St
Sort -r
Rate this question:
Cat
Head
More
Grep
Rate this question:
^pat
$pat
Pat$
Pat^
Rate this question:
Chmod u+x emp[l-3]
Chmod 777 emp*
Chmod u+r ??? emp
Chmod 222 emp?
Rate this question:
All
Ls -a
Find -a
Find all
Rate this question:
Less filename
Touch filename
More filename
Cat filename
Rate this question:
2> filename
2> /dev/null
&> filename
Filename
Rate this question:
Delete
Kill
Stop
Shutdown
Rate this question:
Place
Map
Whereami
Pwd
Rate this question:
Pipe
Awk
Split
Tee
Rate this question:
Compiled
Interpreted
Command processed
None of the above
Rate this question:
Sched
Cron
Sc
Timer
Rate this question:
Simplifying complex jobs
Automating repetitive tasks
Both of the Above
None of the Above
Rate this question:
Repeatedly
Conditionally
Both of the Above
None of the Above
Rate this question:
Can be exported to the entire system
Can be used only within the shell program
Can hold data
All of the above
Rate this question:
Student 3763 3762 0 00:20:09 pts/1 0:00 /bin/sh
Student 3762 3750 0 00:20:03 pts/1 0:00 /bin/ksh
Student 3750 3748 0 00:19:23 pts/1 0:00 /bin/csh
All of the above
Rate this question:
Quiz Review Timeline (Updated): Mar 21, 2023 +
Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.