gpt4 book ai didi

clearcase - cleartool:如何将命令 find 的结果写入文本文件

转载 作者:行者123 更新时间:2023-12-03 08:16:09 25 4
gpt4 key购买 nike

我试图在我的 View 中找到 gt.BridgeGov 分支下的所有文件

  find \gtGov -all -version "brtype(gt.BridgeGov)" -print 

此语句工作正常并列出分支 gt.BridgeGov 下的所有文件。我正在控制台上获取列表,但我想将结果重定向到文本文件。

我尝试了以下
find \gtGov -all -version "brtype(gt.BridgeGov)" > myFile.txt
find \gtGov -all -version "brtype(gt.BridgeGov)" >> myFile.txt

它给我一个错误 cleartool: Error: Extra arguments: ">"

如何将结果重定向到文本文件?

-更新:
find \gtGov -all -version "brtype(gt.BridgeGov)" -print > myFile.txt

也试过这个
当我尝试时完全错误
find \gtGov -all -version "brtype(gt.BridgeGov)" | tee myFile.txt 

cleartool: Error: Extra arguments: "|"
Usage: find { pname ... [-depth | -nrecurse | -directory]
| [pname ...] -all [-visible | -nvisible]
| -avobs [-visible | -nvisible]
}
[-name 'pattern']
[-cview]
[-user login-name]
[-group group-name]
[-type {f|d|l}...]
[-follow]
[-kind object-kind]
[-nxname]
[-element query]
[-branch query]
[-version query]
{-print | -exec command-invocation | -ok command-invocation} ...

最佳答案

您正处于 cleartool session 中。

别。

转到一个 dos 或 shell session ,在您的 ClearCase View 中,然后键入

cleartool find ... > res.txt

以这种方式重定向 cleartool 命令的结果不会有任何问题。

请注意,如果您在动态 View 根目录( M:\myDynView/view/myView ,...)中执行该 cleartool find 命令,您将(无权直接在所述根目录中写入。

但是,您可以将输出重定向到您想要的任何文件:
cd /view/MyView
cleartool find -all ... > /my/path/res.txt

关于clearcase - cleartool:如何将命令 find 的结果写入文本文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14268596/

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