So I have a file which is an external variable. I use a PowerShell script to read it into an array to further process each line.
However, sometimes if the file has only one line, then the array will automatically read the file character-by-character.
Example - input file with only one row:
U09
Code:
$file = get-content $INPUT FILE
Write-Host $file[0]
Then I get the result U
instead of U09
How do I avoid this?