In the Bash Reference Manual:Note that the order of redirections is significant. For example, the  commandls > dirlist 2>&1 directs both standard output (file descriptor 1) and  standard error (file descriptor 2) to the file dirlist, while the  commandls 2>&1 > dirlist directs only the standard output to file dirlist,  because the standard error was made a copy of the standard output  before the standard output was redirected to dirlist.So i made a test about it:> echo Hello world > tmp1> ls tmp1 tmp2  # tmp2 is not exist,so i will get stdout and stderr> ls tmp1 tmp2 1>stdout 2>stderr 1>&2  # stdout file is empty and stderr file get stdout and stderr> ls tmp1 tmp2 1>&2 1>stdout 2>stderr  # stdout file get stdout and stderr file get stdoutBut i still don't know why the position of 1>&2 can make the diffrenceCan anybody explain about it?or is it some reference about this?Thanks!
How to understand the diffrent order of redirections means?
bash;shell script