Skip to content

Instantly share code, notes, and snippets.

@ashwin
Created August 14, 2013 14:25
Show Gist options
  • Save ashwin/6231544 to your computer and use it in GitHub Desktop.
Save ashwin/6231544 to your computer and use it in GitHub Desktop.
A fun cowsay-fortune greeting in every new terminal session. Add to bashrc.
RANGE=2
number=$RANDOM
let "number %= $RANGE"
case $number in
0)
cowcommand="cowsay"
;;
1)
cowcommand="cowthink"
;;
esac
$cowcommand -f $(ls /usr/share/cowsay/cows/ | shuf -n1) $(fortune -s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment