2010-02-04 174 views
1
ssh [email protected] '. ~pvuser/.profile;/opt/datamart/bin/resmgr -import segp 

-colNames "npath cond type" -line "~Thresholds~Transmission_Auto|_|$r|_|rule|_|"' 

我在尝试在上面的bash脚本中将变量$ r传递给ssh时遇到了问题。将bash变量传递给ssh

感谢您的帮助

回答

6

你能试试吗?

ssh [email protected] ". ~pvuser/.profile;/opt/datamart/bin/resmgr -import segp -colNames \"npath cond type\" -line \"~Thresholds~Transmission_Auto|_|$r|_|rule|_|\"" 
+0

感谢它工作得很好:) – soField 2010-02-04 14:42:31

+0

对我也很好:) – 2010-08-23 10:52:42

+0

工作完美。感谢ghostdog。 – jabawaba 2011-11-12 20:57:28