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

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

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

A.
standard error to standard input.

B.
standard input to standard error.

C.
standard output to standard error.

D.
standard error to standard output.

E.
standard output to standard input.

Explanation:
Statndard 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>&2 : Redirects all standard output as well as standard error to
allresult file. Where & is the logical operator.



Leave a Reply 0

Your email address will not be published. Required fields are marked *