Last active
December 25, 2015 05:19
-
-
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/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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