I've always done
(cmd 2>&1) > file
to redirect stderr and stdout to a file. I always thought the parenthesis were necessary, but according to this I can just do cmd > file 2>&1
It seems very unintuitive, though. Does anyone know the rationale behind ordering of redirects?(That said, I'm going to use 'cmd &> file' that I just learned from now on)