revision001 | some text | some text
Comment: some comment
Brief: 1) brief
2) brief
------------------------------------------
revision002 | some text | some text
Brief: 1) brief
2) brief
FIX: some fix
------------------------------------------
revision003 | some text | some text
Comment: some comment
$
$ cat f1
revision001 | some text | some text
Comment: some comment
Brief: 1) brief
2) brief
------------------------------------------
revision002 | some text | some text
Brief: 1) brief
2) brief
FIX: some fix
------------------------------------------
revision003 | some text | some text
Comment: some comment
$
$ ##
$ cat f1 |
> perl -lne 'BEGIN{undef $/}
> while(/(revision.*\).*?\n).*?/msg){($x = $1)=~s/(Comment|\-+).*?\n| \|.+//g;
> print $x}'
revision001
Brief: 1) brief
2) brief
revision002
Brief: 1) brief
2) brief
$
$