【发布时间】:2019-02-05 01:19:18
【问题描述】:
我需要将"写入字符串,因为脚本需要它的格式,但我不知道该怎么做。
需要标记为字符吗?
【问题讨论】:
-
你听说过转义字符吗?
标签: string powershell escaping
我需要将"写入字符串,因为脚本需要它的格式,但我不知道该怎么做。
需要标记为字符吗?
【问题讨论】:
标签: string powershell escaping
您需要将其加倍,将其放在单引号内或使用 ` 转义
echo "This will output a double quote """
echo '"This will also be put in double quotes"'
echo "`"This is another way to quote`""
有关更多字符串引用基础知识,请参阅official documentation
【讨论】: