101-400 Exam QuestionsBrowse all questions from this exam

101-400 Exam - Question 34


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

Show Answer
Correct Answer: C

In Bash, file descriptor 1 represents standard output, and file descriptor 2 represents standard error. The syntax '1>&2' means redirecting standard output (1) to standard error (2). Therefore, inserting '1>&2' after a command redirects standard output to standard error.

Discussion

1 comment
Sign in to comment
DuboisNicolasDuclairOption: C
Oct 21, 2023

In Bash, inserting `1>&2` after a command redirects: C. standard output to standard error. This means that the standard output (file descriptor 1) of the command is redirected to the same location as standard error (file descriptor 2), effectively merging them together.