I'm creating a random output from a CSV using Powershell and, while I have got it to work properly, the output is really annoying because of the excess spaces between each output.
$L = ipcsv ln.csv | Get-Random | Select-Object Letter | Format-Table -HideTableHeaders
$N = ipcsv ln.csv | Get-Random | Select-Object Number | Format-Table -HideTableHeaders
Write-Output $L
Write-Output $N
I just have a basic CSV up to test with. Letter and Number columns, going from A-J and 1-10, is in the CSV. It outputs a random letter and number as intended, but the output comes out like this:
F
9
All of those empty lines flood the console if I do any more than 5 outputs, which gets pretty annoying. Given that the outputs are not separated in the actual script, I want the output to look something like this:
F
9
Is there any way to achieve this output?