入力ファイルは
<section_begin> mxsqlc
*** WARNING[13052] Cursor C is not fetched.
<section_end>
<section_begin> b2.lst
*
*** WARNING[13052] Cursor C is not fetched.
0 errors, 1 warnings in SQL C file "b2.ppp".
<section_end>
<section_begin> b2s0
SQLCODE=0
SQLSTATE=00000
a=10, b=abc, c=20
SQLCODE=0
SQLSTATE=00000
a=10, b=abc , c=10, d=xyz
<section_end>
以下の行のない出力を期待しています。
<section_end>
<section_begin> b2s0
私のコードは
perl -ne 'print unless /^\<section_end\>(\s*|.*lst)?\s*$/' b2exp
すべての<section_end>
行を削除し、この行は削除しません<section_begin> *.lst