#!/usr/local/bin/zsh
alias dec_beer='let beer="\$beer - 1"'
alias print_strophe='echo "$beer bottle$s of beer on the wall,"
echo "$beer bottle$s of beer,"
echo "take one down, pass it around,"
dec_beer
if [ "$beer" -eq "1" ]
then
unset s
fi
if [ "$beer" -eq "0" ]
then
beer="No"
s="s"
fi
echo "$beer bottle$s of beer on the wall."
echo'
beer=99
s="s"
while [ "$beer" -ne "No" ]
do
print_strophe
done
% Zeno version of 99 Bottles of beer (Bottles.zen)
% See http://home.att.net/~srschmitt/zeno.html
% Philipp Winterberg, http://www.winterbergs.de
var b : int := 99
program
while b > 0
put b:2, " bottle(s) of beer on the wall,"
put b:2, " bottle(s) of beer."
put "Take one down, pass it around,"
decr b
put b:2, " bottle(s) of beer on the wall."
put " "
end while
end program
<dtml-comment>
Zope-DTML version of 99 Bottles of beer (Bottles.html)
See @ http://www.stowasser.tv/algo/Bottles.html
Harald Stowasser
</dtml-comment>
<dtml-var standard_html_header>
<dtml-in "_.range(99, 0, -1)" prefix=bottle>
<dtml-var bottle_item> bottle(s) of beer on the wall<br>
<dtml-var bottle_item> bottle(s) of beer.<br>
Take one down, pass it around<br>
<dtml-var "bottle_item-1"> bottle(s) of beer on the wall."<br><br>
</dtml-in>
<dtml-var standard_html_footer>
- -- - --- -- ---- ---- --------------------------------.
keebler@wco.com - http://wco.com/~keebler/ |
keebler/keebobler on IRC :
@Beerman
#cycle 1
#send chug
#end
:sing
bottles of beer! Take one down, pass it around
#sleep 1
#zap chug
#send chug
#end
:chug
99 bottles of beer on the wall
99
#send sing
#end
:chug
98 bottles of beer on the wall
98
#send sing
#end
:chug
2 bottles of beer on the wall
2
#send sing
#end
:chug
1 bottles of beer on the wall
1
#send sing
#end
:chug
No more bottles of beer on the wall,
no more bottles of beer.
Go to the store, buy some more,
99 bottles of beer on the wall!
#die
#en