Showing Fortune and Cowsay on Shell load in Mac OSX

One of the things which I missed upon shifting from Ubuntu to Mac was my custom Cowsay on shell load. So I set about getting the same here.

Fortune gives you random quotes each time.

Screen Shot 2014-10-30 at 8.12.27 am

 Installing Fortune

brew install fortune

Cowsay gives you random animal saying things you pipe to it each time.

Screen Shot 2014-10-30 at 8.13.28 am

Installing Cowsay
sudo gem install cowsay

Getting it all together

If you are using zsh, then insert the following in your .zlogin located at the home folder
fortune | cowsay

If you are using bash, put the same in the .bashrc

Then reload your shell. Voila, now each time you load the shell you will get animals saying random quotes

Screen Shot 2014-10-30 at 8.17.52 am Screen Shot 2014-10-30 at 8.17.43 am

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">