redirect

There are three standard input and output in linux, namely STDIN, STDOUT, STDERR, the corresponding numbers are 0, 1, 2.

STDIN is the standard input, which reads information from the keyboard by default;
STDOUT is the standard output, which outputs the output to the terminal by default, that is, the display or something;
STDERR is the standard error message, which is also displayed on the terminal by default.

2>&1 | tee a.txt

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325190313&siteId=291194637