Link Search Menu Expand Document

Information in this page is outdated. Last update was made on 01 October 2015.

OSX: Randomize cow in Cowsay with Fortune

Table of contents

  1. Installation via Homebrew
  2. Command
  3. Other Information
  4. Notes

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


fortune | cowsay -f $(ls /usr/local/Cellar/cowsay/3.03/share/cows | gshuf -n1)

Other Information

  1. shuf - is a linux command
  2. gshuf - is an OSX equivalent command via coreutils


The first paragraph is a wikipedia definition of cowsay and fortune.

Back to top


This site uses a fork version of Just the Docs, a documentation theme for Jekyll, by Patrick Marsceill.
Copyright © 2008-2021 Timothy Escopete.
All rights reserved as provided by law.