Skip to content

Instantly share code, notes, and snippets.

@wendelnascimento
Created August 21, 2017 14:07
Show Gist options
  • Save wendelnascimento/2493aa4ba84c624a6df354955cd9fbd5 to your computer and use it in GitHub Desktop.
Save wendelnascimento/2493aa4ba84c624a6df354955cd9fbd5 to your computer and use it in GitHub Desktop.
Random cow in cowsay in .zshrc
dir='/usr/local/Cellar/cowsay/3.04/share/cows/'
file=`/bin/ls -1 "$dir" | gsort --random-sort | head -1`
cow=$(echo "$file" | sed -e "s/\.cow//")
fortune | cowsay -f $cow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment