Trying to replace CRLF in a small PowerShell script
Works OK with standard characters bit not with `n ;
file.txt look like this:
Line1
Line2
Line3
Line4
would like the file to look like this:
Line1,Line2,Line3,Line4
Here is the script below
$Strings = Get-Content e:\powershell\file.txt
Foreach ($String in $Strings){
$string -replace ("`n" , ",")
}