How to avoid using import-csv for huge sized files?
How to avoid using import-csv for huge sized files. Currently I am using System.IO.File . Can someone share some lights with clear understanding of Get-content vs System.IO.StreamReader.
[System.IO.File]::OpenText('big.txt') | ForEach-Object {
$line = $_.ReadLine()
if ($null -eq $line) { $_.Dispose(); break }
# process $line
}