One-Liner: Padding a Number with Leading Zeroes

I’m putting this here only because I’m tired of searching for it.  How to pad an integer with leading zeroes is trivial.  1..16 | % { "{0:D2}" -f $_ } And padding a float with trailing zeroes is more of the same: $i = 2; (1..10) | % { “{0:F5}” -f $i; $i = $i…

0

Why Use Semi-colons

I get asked from time to time why I still put semi-colons at the end of each statement.  Part of it is force of habit. Part of it is trying to make sure my script source is useful no matter how the web server, post edtior, and user’s brower decide to display it.  Sometimes, some combination of…

0