Information in this page is outdated. Last update was made on 01 October 2015.
OSX: Randomize cow in Cowsay with Fortune
Table of contents
Cowsay is a program which generates ASCII pictures of a cow with a message. It can also generate pictures using pre-made images of other animals, such as Tux the Penguin, the Linux mascot. While fortune is a simple program that displays a pseudorandom message from a database of quotations.
When fortune is piped to cowsay, it generates an ASCII pictures of a random cow which displays a pseudorandom random quotation message.
Installation via Homebrew
brew install fortune
brew install cowsay
brew install coreutils
Command
fortune | cowsay -f $(ls /usr/local/Cellar/cowsay/3.03/share/cows | gshuf -n1)
Other Information
- shuf - is a linux command
- gshuf - is an OSX equivalent command via coreutils
Notes
The first paragraph is a wikipedia definition of cowsay and fortune.