问题描述
我试图在我的视图中找到gt.BridgeGov分支下的所有文件
查找\gtGov -all-版本 brtype(gt.BridgeGov) -print
此语句可以正常工作并列出下的所有文件分支gt.BridgeGov。我正在控制台上获取列表,但是我想将结果重定向到文本文件。
我尝试了以下
查找\gtGov -all -version brtype(gt.BridgeGov)> myFile.txt
找到\gtGov -all -version brtype(gt.BridgeGov)>> myFile.txt
它向我抛出一个错误cleartool:错误:额外参数:>
如何将结果重定向到文本文件?
-更新:
找到\gtGov -all -version brtype(gt.BridgeGov) -print> myFile.txt
在尝试时也尝试了
完全错误
找到\gtGov -all -version brtype(gt.BridgeGov) | tee myFile.txt
cleartool:错误:额外参数: |
用法:找到{pname ... [-depth | -nrecurse |目录]
| [pname ...]-全部[-可见| -nvisible]
| -avobs [-可见| -nvisible]
}
[-name'pattern']
[-cview]
[-user login-name]
[-group group-name]
[-type {f | d | l} ...]
[-follow]
[-kind object-kind]
[-nxname]
[-元素查询]
[分支查询]
[版本查询]
{-print | -exec命令调用| -ok命令调用} ...
不要。
在ClearCase视图中进入dos或shell会话,然后键入
cleartool查找...> res.txt
以这种方式重定向cleartool命令的结果不会有任何问题。 / p>
请注意,如果要在 dynamic 视图根目录( M:\myDynView
或 / view / myView
,...),您将无权直接在所述根目录中写入。
但是,您可以将输出重定向到所需的任何文件:
cd / view / MyView
cleartool find -all ...> /my/path/res.txt
I am trying to find all the files under gt.BridgeGov branch in my view
find \gtGov -all -version "brtype(gt.BridgeGov)" -print
This statement works fine and list all the files under branch gt.BridgeGov. I am getting the list on console, but I want to redirect result to text file.
I tried the following
find \gtGov -all -version "brtype(gt.BridgeGov)" > myFile.txt
find \gtGov -all -version "brtype(gt.BridgeGov)" >> myFile.txt
Its throwing me an error cleartool: Error: Extra arguments: ">"
How can redirect the result to a text file?
-Update:
find \gtGov -all -version "brtype(gt.BridgeGov)" -print > myFile.txt
Tried this alsoComplete Error When I try
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} ...
You are in a cleartool session.
Don't.
Go to a dos or shell session, in your ClearCase view, and type
cleartool find ... > res.txt
You won't have any issue redirecting the result of a cleartool command that way .
Note that if you are executing that cleartool find command in a dynamic View root directory (M:\myDynView
, or /view/myView
, ...), you won(t have the right to write directly in said root directory.
However, you can redirect your output to any file you want:
cd /view/MyView
cleartool find -all ... > /my/path/res.txt
这篇关于cleartool:如何将命令查找的结果写入文本文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!