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

(Fixed)

Date:02/15/06
Author:Chris Johnson
URL:n/a
Comments:1
Info:http://www.zsh.org
Score: (3.01 in 135 votes)
!/usr/bin/env zsh
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,"
        let beer="$beer - 1"
        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" != "No" ]
do
        print_strophe
done

Download Source | Write Comment

Alternative Versions

VersionAuthorDateCommentsRate
function based versionKOBAYASI, Hiroaki12/26/100

Comments

>>  LawandaSosa18 said on 06/18/10 20:27:24

LawandaSosa18 That's cool that people are able to take the <a href="http://lowest-rate-loans.com/topics/mortgage-loans">mortgage loans</a> moreover, that opens up new possibilities.

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: