Scripting Games 2008 Beginners Windows PowerShell Event 6
Event 6: Coffee Break I liked this one, mine with sugar and cream please ! :
$drinks = @{Espresso=0;Latte=0;Cappuccino=0}
gc c:\scripts\Coffee.txt |% {$d,$c = $_.split();$drinks."$d" += $c}
$drinks.Remove('Office')
$drinks | ft -h
PoSH> .\event6b.ps1
Espresso 13
Latte 22
Cappuccino 18
PoSH>
Enjoy,
Greetings /\/\o\/\/