Redirection 2>&1 or ...?

From: Rex Gustavus Adolphus (uffesterner_at_spamhole.com)
Date: 04/30/04


Date: 30 Apr 2004 00:44:30 -0700

Hi

Is there any difference in the resulting output if you use:

command 1>output 2>&1

or

command 1>output 2>output
?

I tried it myself with a simple shellscript:
#!/bin/sh
ls
lsk

(where lsk is an invalid command)
In the first case I got the errormessage last in output
and in the second case I got it first.