Created
July 24, 2012 19:14
-
-
Save josheinstein/3171994 to your computer and use it in GitHub Desktop.
Expand-Numbers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Set-Location ~\Dropbox\Work\Journal\201207 | |
| Import-CSV numbers.csv -Header From,To | %{ | |
| if ($_.From -match '^\d+$') { | |
| [Int64]$From = $_.From | |
| [Int64]$To = $(if ($_.To) { $_.To } else { $From }) | |
| [Int64]$i = $From | |
| while ($i -le $To) { | |
| Write-Output $i | |
| $i += 1 | |
| } | |
| } | |
| } | Sort | sc numbers.txt |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
something quick I threw together for Jan that takes a CSV file containing DID ranges and prints out the sorted list of all numbers in the range.