I'm attempting to combine every two lines of the output of this Powershell command:
(((Invoke-WebRequest -Uri "https://www.timeanddate.com/holidays/us/$(Get-Date -Format yyyy)").Content | sls 'id=holidays') -split '<th class="nw" >' | Out-String -Stream) -replace '<|>',',' | ForEach-Object {$_.Split(',')[10,0];}
As you can see if you run it it outputs holidays and their date for the current year like so:
New Year's Day
Jan 1
World Braille Day
Jan 4
Epiphany
Jan 6
Orthodox Christmas Day
Jan 7
International Programmers' Day
Jan 7
etc.
My goal is for the output to be:
New Year's Day Jan 1
World Braille Day Jan 4
Epiphany Jan 6
Orthodox Christmas Day Jan 7
International Programmers' Day Jan 7
etc.
Any suggestions are welcome (I would like to do this without writing output to a file during the process). Or if there is a more efficient way of doing this I'm open to that as well.