Created
March 29, 2015 15:55
-
-
Save josephbales/fed14c99bcc101b06c5e to your computer and use it in GitHub Desktop.
Takes a file, splits it into chunks of 8 lines, orders the chunks of 8 lines into a tab delimited string, writes to file
This file contains 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
$inputfile = "Week" | |
$outputfile = "plan.txt" | |
Out-File $outputfile | |
$input = Get-Content $inputfile | |
$i = 0 | |
$l = $input.Length | |
while ($i -lt $l) | |
{ | |
$chunk = (Get-Content $inputfile)[$i..($i+7)] | |
Add-Content $outputfile ($chunk -join "`t") | |
$i+=8 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment