In case you have file1 and file2, but file3 does not exist, the following command will output the valid part to outfile, and then append the error to the end of outfile:
cat file1 file2 file3 1>outfile 2>&1
But if you change the order:
cat file1 file2 file3 2>&1 1>outfile
The error is printed into the terminal (&1) despite the fact the terminal is redirected to outfile. I'm confused, what is the proper way to understand both commands?
Thanks.