In cron I've put line:
So, what I wanted to achieve:
If all went without errors, then don't pester me with STDOUT output emails
That is..., IF error occurs with portsnap, THEN email me STDERR.
And here we come to unlogic behaviour.
Line above, in cron will fail and only first echo "HEEEELOOO!!" will appear in mail as fail occur at second(portsnap) part
But I get no reason/explanation, becuse STDERR is empty and portsnap's error msg ended up in STDOUT, which I've set to go to hell(/dev/null), assuming it would contain repetitive pestering content
Removing ' > /dev/null', part exposed:
Now THAT was supposed to go in STDERR!
Soon I will start to code scripts that control OS, so I need to know, this.
ATM, look very unlogic to me.
Code:
echo "HEEEELOOO!!" && portsnap fetch update > /dev/null && echo "HEEEELOOO!!"
So, what I wanted to achieve:
If all went without errors, then don't pester me with STDOUT output emails
That is..., IF error occurs with portsnap, THEN email me STDERR.
And here we come to unlogic behaviour.
Line above, in cron will fail and only first echo "HEEEELOOO!!" will appear in mail as fail occur at second(portsnap) part
But I get no reason/explanation, becuse STDERR is empty and portsnap's error msg ended up in STDOUT, which I've set to go to hell(/dev/null), assuming it would contain repetitive pestering content
Removing ' > /dev/null', part exposed:
portsnap fetch should not be run non-interactively.
Run portsnap cron instead.
Now THAT was supposed to go in STDERR!
Soon I will start to code scripts that control OS, so I need to know, this.
ATM, look very unlogic to me.