且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Cmd字符串和PowerShell字符串中的转义字符

更新时间:2023-02-03 09:34:18

在PowerShell中,转义字符是反引号," &QUOT ;.但是如果字符串用双引号引用,你也可以通过加倍来转义任何嵌入的双引号字符,如"""中所示。我会用'"替换命令中的任何双引号
In PowerShell the escape character is the backtick, "`". But if the string is quoted with double quotes, you can also escape any embedded double quote characters, ", by doubling them, as in "". I would replace any double quotes in the command with `".