R4RIN
Articles
Java 8
MCQS
Shell Scripting MCQ Quiz Hub
Shell Scripting Mcq Question Set 4
Choose a topic to test your knowledge and improve your Shell Scripting skills
1. Continue statment cannot be used in which loop?
For loop
until loop
while loop
case...esac
2. Which of the following statement causes the current iteration of the loop to exit, rather than the entire loop?
Continue
break
return
goto
3. What is the syntax of continue statement?
continue
continue n
continue this
All of the above
4. Which symbol is used for taking input from standard input?
&
%
-
$
5. Which of the following symbol(s) can be used to redirect the output to a file or another program?
|
>
>>
All of the above
6. The >> symbol is used to overwrite the existing file if it exists and | is used to give input to another program.
True, False
True, True
False, True
False, False
7. We can redirect the error message to file named newfile using __________ command.
cat foo errorfile
cat foo >errorfile
cat errorfile>foo
cat foo 2>errorfile
8. Which symbol is used to redirect error messages to /dev/null?
<
>
%
$
9. Which command saves one copy of character stream in a file and store the other to standard output?
who
tee
ls
wc
10. Which of the following is not true about tee command?
it is a feature of the shell
it is an external command
tee command duplicates its input
tee is an internal command
Submit