Where to place a Bash shell redirection for a command?

view full story

http://unix.stackexchange.com – Apart from the standalone exec >&2 to redirect the current shell's input and output are there any behavioral differences in the following commands: echo -en "C\nB\nA\n" | sort 2>/dev/stdout >&2 echo -en "C\nB\nA\n" 2>/dev/stdout >&2 | sort 2>/dev/stdout >&2 echo -en "C\nB\nA\n" | sort If the above commands were equivalent which is the preferred variant? Phrased differently which is more idiomatic? (HowTos)