02.04.2014 17:20, David Nelson:

> Hmm. Ok. I tried removing the part using tee so now it's like this:
>  if [ -x /usr/bin/mrtg ] && [ -r /etc/mrtg/rm_127_switch-mrtg.cfg ] ; then
> env LANG=C /usr/bin/mrtg /etc/mrtg/rm_127_switch-mrtg.cfg 2>&1 >>
> /var/log/mrtg/mrtg.log ; fi
> 
> ....and I am still getting emails to root. Shouldn't this be sending all
> the output to the file and not standard error?

No. First, you redirect stderr to a duplicate of stdout (when it's still
unchanged) and redirect
 stdout afterwards. Do it the other way round:

> env LANG=C /usr/bin/mrtg /etc/mrtg/rm_127_switch-mrtg.cfg >>
/var/log/mrtg/mrtg.log 2>&1

-- 
Regards
  mks


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: https://lists.debian.org/533c2f7b.9010...@list-post.mks-mail.de

Reply via email to