我尝试了很多尝试用“html”后面的“foo”标签替换“\ crf”的组合。如何用powershell替换反斜杠CR LF
我的输入文件(tempA.txt)看起来像这样(有1行的末尾CR LF斜线后):
foo\
bar
我使用的是蝙蝠中的PowerShell命令(文件)像这样:
type c:\temp\tempA.txt
powershell -Command "(gc c:\temp\tempA.txt) -replace '\\`r`n', '<br>' | Out-File c:\temp\tempB.txt"
type c:\temp\tempB.txt
我的输出文件(tempB.txt)没有改变。我希望输出文件包含
foo<br>bar
如何用简单的html“br”标记替换“\ cr lf”?