What does the ampersand indicate in this bash command 1>&2

后端 未结 6 1461
慢半拍i
慢半拍i 2020-12-23 16:43

Quick one, 2>&1 redirects stderr to stdout, but what does the ampersand mean? I know if we had 2 > 1 it would output to a file named

6条回答
  •  感情败类
    2020-12-23 17:23

    The ampersand doesn't do anything - it's the character in the 2>&1 operator rather than being a thing in its own right.

    bash supports several redirection operators, the 2>&1 operator or the &> operator tie together the streams of the process before or after redirection.

提交回复
热议问题