If several redirections are used together, does changing their order make difference?How shall one understand the meaning of their order? Is the chained channel of redirections built as reading the redirections from left to right, or from right to left?For examplecommand 2>&1 > somefilecommand > somefile 2>&1Thanks and regards!
understand a sequence of redirections
bash;shell;io redirection
Yes, the order makes a difference, and they should be read left to right.command 2>&1 >somefile means to redirect stderr (2) to the current destination of stdout (the terminal).  Then change stdout to go to somefile.  So stderr goes to the terminal, and stdout goes to a file.command >somefile 2>&1 means to redirect stdout to somefile, and then to redirect stderr to the same destination as stdout (the file).  So both stderr and stdout go to somefile.This is explained in section 3.6 of the Bash manual: Redirections.