gpt4 book ai didi

clearcase - cleartool lsview 找不到匹配项

转载 作者:行者123 更新时间:2023-12-02 01:51:22 25 4
gpt4 key购买 nike

我在 UNIX(版本 7.1.2.12)下运行 cleartool lsview 命令时遇到一个非常奇怪的错误。

该命令一般有效,但对于某些用户 (!) 它会给出以下错误消息:

cleartool: Error: No matching entries found for view tag "user_*".

我首先在 Perl 脚本中遇到此错误,但它也可以在命令行中重现。我尝试做类似的事情:

cleartool lsview user_\*

其中 user 是用户名。对于大多数用户(比如我自己),cleartool 将列出以我的用户名开头并后跟下划线的我的 View 。

对于其他一些用户,该命令将返回一个包含他们的观点的列表,但除此之外,它还会产生上述错误消息。我的脚本显然会检查 ClearCase 错误并停止工作。如果我遗漏了下划线(模式中的任何下划线!),错误消息就会消失。

查询用户的意见有什么需要注意的吗? IT 让我去做:

cleartool lsview|grep "user_"

这可以在没有错误消息的情况下工作,但我想了解为什么会出现错误。

感谢您到目前为止的阅读。

最佳答案

我总是使用 grep,但我只是在命令行(在 Windows 上)中进行测试。这有效:

 cleartool lsview prefix_*

换句话说,我从来不需要转义“*”。这不起作用:

 cleartool lsview prefix_\*
cleartool: Error: Invalid view tag: "prefix_\*".

这可能取决于 shell 如何解释“*”,如 this similar bug 中那样。

在 Unix 下,您可能希望避免使用双引号引起来的 a premature interpretation of the '*' (wildcard expansion):

cleartool lsview "prefix_*"

OP user2606240 中的 the comments 报告:

As soon as the _ is in the view name I get the error message.
As far as I understood the registry and registered views that should not be the case.
I think I'll just implement the grep after lsview and live with it.

关于clearcase - cleartool lsview 找不到匹配项,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22456399/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com