#!/usr/bin/ksh FORTUNE_FILE=$HOME/doc/misc/quotes.txt # xmessage redirected because otherwise displays to stderr "Warning: Actions not found: default-exit" cat $FORTUNE_FILE | perl -e '@fortunes=; srand(time); ($a,$b,$c,$d)=split(/\,\s*/, $fortunes[1+int(rand($#fortunes))], 4); print "$d\n$a ($b, $c)\n"' | fmt -40 | xmessage -c -bu " OK " -file - 2>/dev/null