如何批量将plink的输出分配给变量?

时间:2013-01-27 16:08:43

标签: windows batch-file

如何分配以下命令的输出        /出口/家庭/ XYZ

var=(plink -pw "mukesh" "mukesh@192.168.79.128" echo $HOME)

并在此处使用

pscp "C:\Documents and Settings\mukesh\putty\pub.ppk" "mukesh@192.168.79.128:$var/.ssh/puttykey.ppk"

我尝试了这个,但它没有用。

for /f %%i in ('plink -pw "mukesh" "mukesh@192.168.79.128" echo $HOME') do set VAR=%%i
%%i was unexpected at this time.

0 个答案:

没有答案