Skip to main content

Friday fun with cows and lolcats

The cow has spoken again, and it’s been very insightful:

cowsay

Cows are a well known and frequent phenomenon in Unix/Linux world. They’ve also been spotted in many other computerized ecosystems. They’re very happy with MacOS. WSL is okay too. Myself I have even managed to put a talking cow on an Android phone. For those still unfamiliar with it, here are the necessary ingredients:

  • fortune - a program displaying random messages from a vast database of quotations
  • cowsay - a program which generates ASCII pictures of a cow with a message
  • lolcat - ruby script which adds rainbow colors to the piped output

You can install these utilities with package manager of your choice, i.e.

brew install fortune cowsay lolcat

or

sudo apt install fortune cowsay lolcat

Now try and pipe them together. When bored, piping random programs and seeing what happens can be an endless source of amusement on Linux. So, when I pipe-connect these three:

fortune | cowsay | lolcat

this is what happens:

cowsay

For convenience, I have defined an alias in my bash profile:

alias cow="clear; fortune | cowsay | lolcat"

and now, when I need some inspiration, I just say:

cow

which is promptly responded by:

cowsay

Have a great weekend with terminal!