PowerShell powershelluniquewindows 21/02/2016

Remove empty lines with PowerShell

Examples:

Full version:

Get-Content input.txt | Where-Object {$_ -ne ""} > output.txt

Short version:

cat input.txt | ? {$_ -ne ""} > output.txt