Last active
April 18, 2018 01:05
-
-
Save TheGreatRambler/7ea40e53e2692e68b50c47e696830778 to your computer and use it in GitHub Desktop.
Cowsay fun
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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