PrepAway - Latest Free Exam Questions & Answers

In bash, inserting 1>&2 after a command redirects

In bash, inserting 1>&2 after a command redirects

PrepAway - Latest Free Exam Questions & Answers

A.
standard output to standard error.

B.
standard error to standard output.

C.
standard input to standard error.

D.
standard output to standard input.

E.
standard error to standard input.

Explanation:
Standard Input use < symbol and 0 is the integer value Standard Output use > symbol and 1 is the integer value Standard Erroruse 2> symbol and 2 is the integer value

Example:
find / – name passwd >allresult 1>&amp;2 : Redirects all standard output as well as standard error to allresult file. Where &amp; is the logical operator.


Leave a Reply