Quick one, 2>&1 redirects stderr to stdout, but what does the ampersand mean? I know if we had 2 > 1 it would output to a file named
2>&1 redirects standard error (file handle 2) to the same file that standard output (file handle 1) is currently going to.
It's also a position-dependent thing so:
prog >x 2>&1 >y
will actually send standard error to x and standard output to y as follows:
x;x;y;