Can anybody tell me the difference between 1>&2 and 2>&1?
1 is stdout 2 is stderr
By default stdout is the "normal" stream for program out, stderr is for errors and warnings only. Both of those statments combine stdout and stderr into one stream - the first places all stderr and stdout output on 2, the second places all output on 1