PrepAway - Latest Free Exam Questions & Answers

Which of the following operators is used to connect the output of one command to the input of another command?

Which of the following operators is used to connect the output of one command to the input of
another command?

PrepAway - Latest Free Exam Questions & Answers

A.
>

B.
|

C.
2>

D.
&>

Explanation:

A pipe is a way to connect the output of one command to the input of another command without
any temporary file.
What is a pipe?
A pipe is a temporary storage place where the output of one command is stored and then passed
as the input for another command. Pipes are used to run more than two commands from the same
command line.
Syntax:
command1 | command2 | command3………..etc.
Answer option A is incorrect. The operator > is used to redirect standard output (STDOUT) to a
file.
Answer option C is incorrect. The operator 2> is used to redirect standard error (STDERR) to a
file.
Answer option D is incorrect. The operator &> is used to redirect all output to a file.


Leave a Reply