来自脚本的Clearcase运行命令(错误:错误的电话号码) [英] Clearcase running commands from a script (error: Bad phone number)

查看:94
本文介绍了来自脚本的Clearcase运行命令(错误:错误的电话号码)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

希望有人在这里有一些见识。
我有一个名为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"

请参见 在动态视图中文件添加到目录的源代码管理的命令行返回错误

注意:

  • as this thread suggests, even if the alias is already defined, a ct setview won't allow further ct commands to work, because setview spawns a sub-shell. See for instance "Python and ClearCase setview" for more on setview.
    So ct will work, except if you have further ct commands in a script after a ct 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆