I follow the post here and it works, but not as good as it was before..
I add this code to /etc/bash.bashrc
Code: Select all
dir='/usr/share/cowsay/cows/'
file=`/bin/ls -1 "$dir" | sort --random-sort | head -1`
cow=$(echo "$file" | sed -e "s/\.cow//")
/usr/games/fortune -a | cowsay -f $cow