#! /bin/sh # # just a small script to generate a signature for mutt # # # first set $LONG to a higher value than needed LONG=88 # get the static stuff cat ~/.signature_nostal # grep some info about the used environment ;) echo "[ "`uname -sr `" .:. "`grep -A 1 Version /var/log/XFree86.0.log|sed -e s/".*Version"/"XFree86"/1 -e s/"\/ [A-Za-z].*"/" "/1 -e q`" .:. "`openbox --version | grep Open`" ]" # now generate a fortune that is not longer than the above part # of the signature while [ "$LONG" -gt "61" ] do EXCUSE=`(/home/arvid/bin/my_fortune -s -n 61 /home/arvid/files/fortunes/bofh-excuses)` LONG=`(echo $EXCUSE | wc -c | sed -e s/\ //g)` done echo "$EXCUSE"