Language AWK
Date: | 04/20/05 |
Author: | Whitey |
URL: | n/a |
Comments: | 4 |
Info: | n/a |
Score: | ![]() |
#!/usr/bin/awk -f # awk version of 99 bottles of beer # by Whitey (whitey@netcom.com) - 06/05/95 BEGIN { for(i = 99; i > 0; i--) { print s = bottle(i), "on the wall,", s "," print "take one down, pass it around," print bottle(i - 1), "on the wall." } } function bottle(n) { return sprintf("%s bottle%s of beer", n ? n : "no more", n - 1 ? "s" : "") }
Download Source | Write Comment
Alternative Versions
Version | Author | Date | Comments | Rate |
---|---|---|---|---|
bottled version | Wilhelm Weske | 11/16/08 | 0 | ![]() ![]() |
correct text | OsamuAoki | 11/03/07 | 2 | ![]() ![]() |
3 | Arnold Robbins | 01/25/08 | 0 | ![]() ![]() |
Download Source | Write Comment
Add Comment
Please provide a value for the fields Name,
Comment and Security Code.
This is a gravatar-friendly website.
E-mail addresses will never be shown.
Enter your e-mail address to use your gravatar.
Please don't post large portions of code here! Use the form to submit new examples or updates instead!
Comments
Go to the store and buy some more...
not really..............................just does'nt make sense