blob: b6989543811e2afe2738c11b74cd6838f69db30f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# if last line, print and exit
$ { p; b; }
# copy pattern in hold, read next line
h; n;
# while line ok print
:checkline
/^[A-Z]\{4\}-[0-9]\{5\}/ {
# clean and print previous
x; s/\n/ /g; p;
# if last line, print and exit
$ { x; p; b; }
# read next line
n; b checkline;
}
# append, clean, print
H; n; b checkline;
|