我有这种档案:
1 0 1
2 0 3
2 1 2
3 0 3
4 0 1
4 1 1
4 2 1
4 3 1
5 0 1
8 0 1
10 0 1
11 0 1
塞族共和国的分离者是一空一线。
如果存在双重空白线,我们必须代之以如下方式: 1 0<>code>,
$1
, 即之前增加的“编号”, 编号1 0*
。
If the separator is empty line + 1 empty line
we have to increase the $1 by 1.
If the separator is empty line + 2 empty line
we have to increase the $1 by 2.
...
and I need to get this output:
1 0 1
2 0 3
2 1 2
3 0 3
4 0 1
4 1 1
4 2 1
4 3 1
5 0 1
6 0 0
7 0 0
8 0 1
9 0 0
10 0 1
11 0 1
提前感谢!