> Luke Bakken wrote:
>>> cmd1 2>&1 >$WHERE
>>
>> This doesn't do what you think it does, which I'm assuming is redirect
>> stderr and stdout to $WHERE.
>>
>
> What does it do?  I was of the belief that it is indeed doing the above,
> and the log/scratch files I redirect to have always seemed to back that
> up, showing both stdout- and stderr-looking output.  I'd really like to
> know, and if there's something wrong with doing "2>&1 >" then what is
> the correct method?
>
> Thank you,
> Mark
>
>

The `2>&1` syntax directs the STDERR output to wherever STDOUT is going at
the time of evaluation.  (Note that 2>&1 comes before >$WHERE so STDOUT
has not been redirected yet.)  See man ksh for more information.

Tim Donahue

Reply via email to