Random Cow Fortunes in Terminal :P
Fortune favors the cow (not really).
How-to:
From a high level this is what you do:
- Install cowsay and fortune via HomeBrew for Mac users or apt-get for linux (or whatever package manager you use)
- Install lolcat via Rubygems
- ???
- Profit
In terms of execution, just paste this into your Terminal:
$ sudo apt-get -y install cowsay lolcat # Linux only
$ brew install cowsay fortune # Mac / OSX only. Install Homebrew if this doesn't work
$ gem install lolcat
$ fortune | cowsay | lolcat
Thats it!
For a random cow with a random quote on new sessions, then do this (you may need to edit if you’re not using bash or your profile’s somewhere else):
$ cat << 'EOM' >> ~/.bash_profile
#random cow to say random things
cowlist=( $(cowsay -l | sed "1 d") );
thechosencow=${cowlist[$(($RANDOM % ${#cowlist[*]}))]}
fortune | cowsay -f "$thechosencow" | lolcat
EOM
Now on Terminal starts, you get something like this:
Inspired and edited from this gist and this post, which unfortunately required you to have node installed as well, so I’ve edited the code to be more portable on different systems