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
Comments
  1. Step [1] is used to skip every line until the first line of a unnamed block.
  2. Steps [2] thru [4] constitute a loop which repeats printing the current line and read next line by command 'n', until the last line of that block, which matches ^#$, is reached.