Anonymous user
99 Bottles of Beer/Shell: Difference between revisions
moving code from main task-page to sub-page / ProDOS
(moving code from main task-page to sub-page / Powershell) |
(moving code from main task-page to sub-page / ProDOS) |
||
Line 223:
$s2=$( if( $_ -ne 2 ) { 's' } else { '' } )
"$_ bottle$s of beer on the wall`n$_ bottle$s of beer`nTake one down`npass it around`n$( $_ - 1 ) bottle$s2 of beer on the wall`n"}</lang>
=={{header|ProDOS}}==
<lang ProDOS>editvar /newvar /value=a=99
:a
printline -a- bottles of beer on the wall
printline -a- bottles of beer
printline Take one down, pass it round
editvar /newvar /value=a=-a-1
if -a- /hasvalue 1 goto :1
printline -a- bottles of beer on the wall.
goto :a
:1
printline 1 bottle of beer on the wall
printline 1 bottle of beer
printline take it down, pass it round
printline no bottles of beer on the wall.
editvar /newvar /value=b /userinput=1 /title=Keep drinking?
if -b- /hasvalue yes goto :a else exitprogram</lang>
=={{header|UNIX Shell}}==
|