My question is about redirection precedence is bash. Suppose you have a command:
cmd1 < cmd2 > cmd3
Would it translate to:
(cmd1 < cmd2) > cmd3
Or
cmd1 < (cmd2 > cmd3)
bashio-redirection
My question is about redirection precedence is bash. Suppose you have a command:
cmd1 < cmd2 > cmd3
Would it translate to:
(cmd1 < cmd2) > cmd3
Or
cmd1 < (cmd2 > cmd3)
Best Answer
The POSIX standard specifies that shell redirection is from left to right; that is, order is significant:
bash
operates in compliance with this part of the standard:As for piping: