Skip to content

Instantly share code, notes, and snippets.

@mike-spainhower
Last active December 25, 2015 05:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike-spainhower/6923686 to your computer and use it in GitHub Desktop.
Save mike-spainhower/6923686 to your computer and use it in GitHub Desktop.
Cowsay something fun with different eyes and a tongue! I recommend sticking it in /etc/profile.d/
#!/bin/bash
RND=`od -An -N2 -tu2 /dev/urandom`
if [ $(( $RND % 3 )) == 1 ] ; then
MESSAGE=`fortune`
else
MESSAGE=`ddate`
fi
case "$(( $RND % 7 ))" in
0) EYE_OPTION="-eo- ";;
1) EYE_OPTION="-eo- ";;
2) EYE_OPTION="-e^^ ";;
3) EYE_OPTION="-e.. ";;
4) EYE_OPTION="-eoO ";;
esac
echo -e `tput setaf 127`
echo $MESSAGE | cowsay $EYE_OPTION -TU\
# cowsay $EYE_OPTION -TU\ $MESSAGE
echo -e `tput setaf sgr0`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment