Closed lpirl closed 8 years ago
What do you mean? Linkchecker exits with 2 when a program error happens, 1 for bad links.
linkchecker || if [ $? == 2 ]; then echo 'programm error'; fi
I am after a switch to completely suppress any output to at least one of stdout
or stderr
.
The motivation is to avoid that e.g. cron sends emails when no errors occurred.
I think you want chronic, from moreutils?
I do not want it in particular, no. But I sense there is little motivation to include this behavior. Fair enough. :)
(for everyone not willing to install a bunch of tools to get chronic
; use out=
linkchecker … 2>&1|| echo $out
alternatively)
An option like
--cron
would be useful that makes linkchecker output errors only - nothing but errors. That way, running it as a cron job, it would only trigger an email being sent when errors are found.