问题描述
当我运行此命令时,一切正常:
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
但是,如果在exec之后我有两个以上的参数,则这样:
however if I have more than two arguments after exec like this:
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
然后它将失败,并显示以下错误:额外参数:"cm_myview"
then it will fail with the error: extra argument:"cm_myview"
所以现在,如果-exec之后有两个以上的参数,那么它将说这些参数是多余的,任何人都知道我可以解决这个问题.谢谢.
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. 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.
推荐答案
不要尝试使用setview
:它会生成一个子shell,该子shell不能与多个命令配合使用.
有关将要遇到的问题的具体示例,请参见" Python和ClearCase setview ".
Don't try to use setview
: it spawns a sub-shell, which won't ever work well with multiple commands.
See "Python and ClearCase setview" for a concrete example of the kind of issue you will have.
仅使用动态视图的完整路径,正如我在"脚本未运行.
Simply use the full path of a dynamic view, as I mention in "script doesn't run while executing in clearcase".
/view/aView/vobs/...
确保首先启动该视图(cleartool startview
)
Make sure that this view is started first (cleartool startview
)
这里不需要setview
.
这篇关于使用SSH在远程Linux机器上运行带有Agruments的cleartool命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!