Skip to content

Modify every line of a file using PowerShell

get-content text1.txt | % { $_ -replace “\|”, “” } | % { $_ -replace ” “, “” } > text2.txt