[clug] bash stderr and not-so-stderr?

David Schoen neerolyte at gmail.com
Mon Nov 24 09:45:49 GMT 2008


Hmmm. I'm almost certain I've always done it the other way, which
makes much more sense to me stream wise.

Anyway, that appears to have fixed it (will know for certain tomorrow).

- Dave.

2008/11/24 Jeremy Kerr <jk at ozlabs.org>:
> Hi David,
>
>> The problematic line looks something like:
>>     /usr/bin/rdiff-backup $from $to 2>&1 >> $MAILFILE || exit 1
>>
>> I've simplified that line slightly for this post but it has the same
>> problem.
>
> You need to redirect stderr to stdout *after* you've redirected stdout:
>
>  /usr/bin/rdiff-backup $from $to >>$MAILFILE 2>&1
>
> Cheers,
>
>
> Jeremy
>


More information about the linux mailing list