来自脚本的Clearcase运行命令(错误:错误的电话号码) [英] Clearcase running commands from a script (error: Bad phone number)
问题描述
希望有人在这里有一些见识。
我有一个名为xrunner.sh的小外壳。
Hoping someone might have some insight here. I have a small shell titled xrunner.sh.
#!/bin/bash
ct checkout -nc parentFolder
cd parentFolder/
ct mkdir -nc directory
ct checkin -nc directory
cd ..
ct checkin -nc parentFolder
pwd
在CLI上单独运行命令时,它们都可以正常工作;从bash运行时,以下内容又对我了:
When the commands are run individually on the CLI they all work fine, When run from the bash however the following is thrown back at me:
ct: bad phone number -- parentFolder
ct: bad phone number -- -nc
ct: bad phone number -- checkout
: No such file or directory
ct: bad phone number -- directory
ct: bad phone number -- -nc
ct: bad phone number -- mkdir
ct: bad phone number -- directory
ct: bad phone number -- -nc
ct: bad phone number -- checkin
: No such file or directory
ct: bad phone number -- parentFolder
ct: bad phone number -- -nc
ct: bad phone number -- checkin
有人会碰巧知道这是为什么吗?网络参考说明了这一点?
非常感谢。
Would anyone happen to know why this is or point me to some web reference that explains this? Thanks in advanced.
推荐答案
这意味着您没有正确定义别名'ct'
That means you don't have defined the alias 'ct' properly
添加:
alias ct=/path/to/cleartool
注意:如果要向源代码管理中添加目录,请不要忘记调用mkelem
Note: if you want to add a directory to source control, don't forget to call mkelem
cleartool mkelem -mkpath dir1 -c "a comment"
请参见 在动态视图中文件添加到目录的源代码管理的命令行返回错误。
注意:
- 如此线程建议,即使已经定义了别名,
ct setview
也不允许进一步操作ct
命令起作用,因为setview
会生成一个子shell。例如,参见 Python和ClearCasesetview
以获取有关setview
的更多信息。
所以ct
可以工作,除了如果在ct setview
之后的脚本中还有其他ct
个命令。 - 仅供参考,请在以下手册页中找到
/ usr / bin / ct
命令
- as this thread suggests, even if the alias is already defined, a
ct setview
won't allow furtherct
commands to work, becausesetview
spawns a sub-shell. See for instance "Python and ClearCasesetview
" for more onsetview
.
Soct
will work, except if you have furtherct
commands in a script after act setview
. - Just for information, here the the man page for the
/usr/bin/ct
command
ct(1)
NAME
ct - spawn getty to a remote terminal (call terminal)
UNIX命令
/ usr / bin / ct
拨一个电话号码,连接到终端的调制解调器应等待该电话,并且然后在该终端生成一个getty(1M)进程。
getty进程设置终端的类型,模式,速度和行规,然后调用登录过程,当用户正确进行身份验证时,该过程将执行一个shell。
The UNIX command "
/usr/bin/ct
" dials a phone number, where a modem connected to a terminal should be awaiting for the call, and then spawns a getty(1M) process to that terminal.
The "getty" process sets the terminal type, modes, speed and line discipline, and then invokes the "login" process, which in turn will execute a shell when a user authenticates correctly.
这篇关于来自脚本的Clearcase运行命令(错误:错误的电话号码)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!