我正在使用 ClearCase,我想使用批处理脚本来运行通过 cleartool 命令生成的文本文件,并且只提取包含@@
字符串的行,从该行的开头提取直到@@
字符串并在前后加上引号.
一个示例文本文件是:
"Created automatically as a result of 'Work On' action in ClearQuest"
owner: <owner>
group: <group>
stream: <stream>
title: <title>
change set versions:
M:\LEVEL1\PROJECT\src\ROOT@@\main\LEVEL1\6
M:\LEVEL1\PROJECT\src\ROOT\file 7.txt@@\main\LEVEL1\1
M:\LEVEL1\PROJECT\src\ROOT\folder 2@@\main\LEVEL1\2
M:\LEVEL1\PROJECT\src\ROOT\folder 2\file 6.txt@@\main\LEVEL1\1
M:\LEVEL1\PROJECT\src\ROOT\folder 2\file 8.txt@@\main\LEVEL1\1
M:\LEVEL1\PROJECT\src\ROOT\folder 2@@\main\LEVEL1\1
M:\LEVEL1\PROJECT\src\ROOT\file 4.txt@@\main\LEVEL1\2
M:\LEVEL1\PROJECT\src\ROOT@@\main\LEVEL1\5
M:\LEVEL1\PROJECT\src\ROOT\file 2.txt@@\main\LEVEL1\4
M:\LEVEL1\PROJECT\src\ROOT\file 1.txt@@\main\LEVEL1\4
M:\LEVEL1\PROJECT\src\ROOT@@\main\LEVEL1\3
M:\LEVEL1\PROJECT\src\ROOT@@\main\LEVEL1\3\file 3.txt\main\LEVEL1\1
clearquest record id: <id>
clearquest record State: <state>
我希望输出是:
"M:\LEVEL1\PROJECT\src\ROOT"
"M:\LEVEL1\PROJECT\src\ROOT\file 7.txt"
"M:\LEVEL1\PROJECT\src\ROOT\folder 2"
"M:\LEVEL1\PROJECT\src\ROOT\folder 2\file 6.txt"
"M:\LEVEL1\PROJECT\src\ROOT\folder 2\file 8.txt"
"M:\LEVEL1\PROJECT\src\ROOT\folder 2"
"M:\LEVEL1\PROJECT\src\ROOT\file 4.txt"
"M:\LEVEL1\PROJECT\src\ROOT"
"M:\LEVEL1\PROJECT\src\ROOT\file 2.txt"
"M:\LEVEL1\PROJECT\src\ROOT\file 1.txt"
"M:\LEVEL1\PROJECT\src\ROOT"
"M:\LEVEL1\PROJECT\src\ROOT"
这可能吗?
最好的祝福,
安德鲁