我如何仅从 perforce 中检出的文件列表中搜索/grep 字符串。我可以使用以下命令获取我检出的文件列表:p4 opens -a | grep“用户名”..
这应该为你做:
p4 opened -u <username> | cut -d "#" -f 1 | p4 -x - where | cut -d " " -f 3 | xargs grep <search string>
Run Code Online (Sandbox Code Playgroud)
管道命令执行以下操作:
请注意,将 -u 参数添加到 p4 opens 是获取特定用户打开文件的更有效方法,而不是 grepping “p4 opens -a”的输出。
| 归档时间: |
|
| 查看次数: |
607 次 |
| 最近记录: |