How can I replace newlines using PowerShell?

前端 未结 5 2050
野的像风
野的像风 2020-12-08 18:24

Given test.txt containing:

test
message

I want to end up with:

testing
a message

I think the fol

5条回答
  •  攒了一身酷
    2020-12-08 19:08

    You can use "\\r\\n" also for the new line in powershell. I have used this in servicenow tool.

    In my case "\r\n" s not working so i tried "\\r\\n" as "\" this symbol work as escape character in powershell.

提交回复
热议问题