Voting

Category

real language

Bookmarking

Del.icio.us Digg Diigo DZone Earthlink Google Kick.ie
Windows Live LookLater Ma.gnolia Reddit Rojo StumbleUpon Technorati

Language Z-Shell

(function based version)

Date:12/26/10
Author:KOBAYASI, Hiroaki
URL:n/a
Comments:0
Info:http://www.zsh.org
Score: (2.00 in 3 votes)
#!/usr/bin/env zsh

function print_strophe {
	echo "$beer bottle$s of beer on the wall,"
	echo "$beer bottle$s of beer,"
	echo "take one down, pass it around,"
	if ((--beer == 1)) then
		s=''
	elif ((beer == 0)) then
		beer=No
		s=s
	fi
	echo "$beer bottle$s of beer on the wall."
	echo
}

beer=99
s=s
while [[ $beer != No ]] do
        print_strophe
done

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
FixedChris Johnson02/15/061

Comments

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!

Name:

eMail:

URL:

Security Code:
  
Comment: