[英]using SSH to run a cleartool command with agruments on remote a linux machine
when I run this then everything work: 当我运行它时,一切正常:
C:\PROGRA~1\cwRsync\bin\ssh.exe -o 'StrictHostKeyChecking no' 10.10.10.10 -l username /usr/atria/bin/cleartool setview -exec 'pwd' cm_myview
however if I have more than two arguments after exec like this: 但是,如果像这样在exec之后有两个以上的参数:
C:\PROGRA~1\cwRsync\bin\ssh.exe -o 'StrictHostKeyChecking no' 10.10.10.10 -l username /usr/atria/bin/cleartool setview -exec 'cd /user' cm_myview
then it will fail with the error: extra argument:"cm_myview" 那么它将失败并显示以下错误:额外参数:“ cm_myview”
so right now if there is more than 2 argument after -exec, then it will say those argument are extra, anyone know how I can fix this. 所以现在,如果在-exec之后有两个以上的参数,那么它将说那些参数是多余的,任何人都知道我可以解决这个问题。 Thanks.
谢谢。
I am only running one command which run a script file. 我只运行一个运行脚本文件的命令。 But I need to pass arguments to this script file.
但是我需要将参数传递给此脚本文件。 I think the program think the first argument is the view i am tying to set.
我认为程序认为第一个参数是我要设定的观点。
Don't try to use setview
: it spawns a sub-shell, which won't ever work well with multiple commands. 不要尝试使用
setview
:它会生成一个子shell,它不能与多个命令一起很好地工作。
See " Python and ClearCase setview " for a concrete example of the kind of issue you will have. 有关您将遇到的问题的具体示例,请参见“ Python和ClearCase setview ”。
Simply use the full path of a dynamic view , as I mention in " script doesn't run while executing in clearcase ". 只需使用动态视图的完整路径即可 ,正如我在“ 脚本在用clearcase执行时不会运行 ”中提到的那样。
/view/aView/vobs/...
Make sure that this view is started first ( cleartool startview
) 确保首先启动此视图(
cleartool startview
)
No need for setview
here. 这里不需要
setview
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.