This blog has moved to http://ThePowerShellGuy.com
Greetings /\/\o\/\/
I came at this page :
99-bottles-of-beer.net ,
I could not resist making and submitting a PowerShell example to it.
I came to this example :
# 99-bottles-of-beer
99..1 |% {("{0} bottle{1} of beer on the wall, {0} bottle{1} of beer.
Take one down and pass it around, {2} bottle{3} of beer on the wall.`n" -f
$_,$(if ($_ -ne 1){"s"}),($_ -1),$(if ($_ -ne 2){"s"})).replace(' 0',' No more')}
Note, this sample does handle the bottle(s) and 0 = No More, to keep it at least a bit of a chalenge in PowerShell ;-).Enjoy,
Greetings, /\/\o\/\/
Tags :
Monad PowerShell