On 21 Feb 2015, at 08:34 , LuKreme <krem...@kreme.com> wrote: > On Feb 18, 2015, at 6:20 AM, Reindl Harald <h.rei...@thelounge.net> wrote: >> >> <bayes-stats.txt> > > That is a lot cleaner and more obvious, thank you for sharing
I ran this just after log rotation and got div by zero errors, so here is a (nearly) completely pointless ‘fix’: BAYES_TOTAL=`echo "$BAYES_00+$BAYES_05+$BAYES_20+$BAYES_40+$BAYES_50+$BAYES_60+$BAYES_80+$BAYES_95+$BAYES_99" | bc` + if [ ! $BAYES_TOTAL ]; then BAYES_00_PCT=`echo "scale=2; ($BAYES_00*100)/$BAYES_TOTAL" | bc | sed 's/^\./0./‘` … echo -e "BAYES_999 `printf \"%*s\" 8 $BAYES_999` `printf \"%*s\" 7 $BAYES_999_PCT` %” + fi Yes, yes, I know, had I run the script a minute later, no error. But if I didn’t have OCD tendencies, would I even be on this list? :) -- And she was drifting through the backyard And she was taking off her dress And she was moving very slowly Rising up above the earth