Quantcast
Channel: SQLServerCentral » Programming » Powershell » Latest topics
Viewing all articles
Browse latest Browse all 467

Remove newline in CSV field

$
0
0
Hi all,I'm trying to replace text in a CSV.The CSV line looks something like this:[code="other"]"Field One","Field Two","FieldThree","Field Four"[/code]So I tried something like:[code="vb"](Get-Content $csvfile) -replace "Field`n", "Field" | Set-Content $csvfile[/code]But this didn't work.

Viewing all articles
Browse latest Browse all 467

Trending Articles