Description
- The first line of a block begins with a tag entry0/1, then followed by some optional words constituting the name of a block.
- The last line of a block consists of only one character, #.
The following script is used to print every unnamed block.
|
| Raw Input
|
| Desired Output
| entry0/1
line 1.1
line 1.2
line 1.3
#
entry0/1 John, X1
line 2.1
line 2.2
#
entry0/1 John, X2
line 3.1
#
entry0/1
line 4.1
line 4.2
#
|
| entry0/1
line 1.1
line 1.2
line 1.3
#
entry0/1
line 4.1
line 4.2
#
|
|
Script and Comments
Script1 [ 1] /^entry0\/1$/!d
[ 2] :loop
[ 3] n
[ 4] /^#$/!b loop
| |