Cowsay as much as possible


CowsayIfPossible()
{
  if [ -z "${1}" ]; then
    CowsayIfPossible "Supply some text!";
    return;
  fi
  if which cowsay >> /dev/null; then
    cowsay "${1}"
    echo =======================================
  else
    echo "${1}"
  fi
}

Cowsay is win.  EEEPPIIIICCC  WIIIIN.

This BASH script snippet allows the unashamed use of cowsay within bash scripts without fear that it isn’t installed.  World peace?  That’d be nice, but for now cowsay moooooo!

sudo aptitude install cowsay