Skip to content

Instantly share code, notes, and snippets.

@TheGreatRambler
Last active April 18, 2018 01:05
Show Gist options
  • Save TheGreatRambler/7ea40e53e2692e68b50c47e696830778 to your computer and use it in GitHub Desktop.
Save TheGreatRambler/7ea40e53e2692e68b50c47e696830778 to your computer and use it in GitHub Desktop.
Cowsay fun
#!/bin/bash
# copyright TheGreatRambler
# List all cowsay cows with a fun fortune!
stringtouse="$(fortune)"
timesaround=0
for i in $(cowsay -l)
do
if (($timesaround > 2))
then
echo "$(echo ${stringtouse} | cowsay -f $i)"
fi
((timesaround+=1))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment