putty plink -batch 其中命令有一个分号作为参数的一部分
putty plink -batch where the command has a semicolon as part of the parameters
我正在尝试执行以下操作:
plink -batch <user>@<server> <command> <parameter>
参数中包含分号;比如 param="IP1;IP2"
return 说:
bash: IP2: command not found
我试图寻找一种设置方法;分隔符关闭,因此它不期望多个命令。
正在关注 dave_thompson_085's :
Use backslash (\;
). Unlike ssh-ing from Unix where the source shell might swallow it, Windows CMD and plink will send backslash to the server, and bash on the server will parse it as quoting (or escaping) the semicolon
我改成了
plink -batch user@server command parameter\;Parameter_continued
解决了问题。
我正在尝试执行以下操作:
plink -batch <user>@<server> <command> <parameter>
参数中包含分号;比如 param="IP1;IP2"
return 说:
bash: IP2: command not found
我试图寻找一种设置方法;分隔符关闭,因此它不期望多个命令。
正在关注 dave_thompson_085's
Use backslash (
\;
). Unlike ssh-ing from Unix where the source shell might swallow it, Windows CMD and plink will send backslash to the server, and bash on the server will parse it as quoting (or escaping) the semicolon
我改成了
plink -batch user@server command parameter\;Parameter_continued
解决了问题。