Created
August 12, 2014 05:01
-
-
Save stinethebean3/e643e4032d3b3d0dce75 to your computer and use it in GitHub Desktop.
Writes the lyrics to the Bottles of Beer on the Wall song
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 | |
| i=99 s=s | |
| while [ $i -gt 0 ]; do | |
| p="bottle" | |
| p2="of beer" | |
| p3="on the wall" | |
| echo $i $p$s $p2 $p3 | |
| echo $i $p$s $p2 | |
| i=`expr $i - 1` | |
| [ $i -eq 1 ] && s= || s=s | |
| echo "Take one down, pass it around" | |
| if [ $i -eq 0 ]; then | |
| echo "No more bottles of beer on the wall" | |
| else | |
| echo $i $p$s $p2 $p3 | |
| fi | |
| echo " " | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment