Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
nal w write-host
$d='First','Second','Third','Fourth','Fifth','Sixth','Seventh','Eighth','Ninth','Tenth','Eleventh','Twelfth',"A Partridge in a Pear Tree.`n",'Two Turtle Doves, and','Three French Hens,','Four Calling Birds,','Five Gold Rings,','Six Geese-a-Laying,','Seven Swans-a-Swimming,','Eight Maids-a-Milking,','Nine Ladies Dancing,','Ten Lords-a-Leaping,','Eleven Pipers Piping,','Twelve Drummers Drumming,'
$l="On the % day of Christmas`nMy true love sent to me"
0..11|%{w $l.Replace("%",$d[$_])
$_..0|%{w $d[$_+12]}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment