linux nl命令与逻辑页

http://www.gnu.org/software/coreutils/manual/coreutils.html#nl-invocation

The beginnings of the sections of logical pages are indicated in the input file by a line containing exactly one of these delimiter strings:

‘\:\:\:’
start of header;
‘\:\:’
start of body;
‘\:’
start of footer.

我的例子:

[root@localhost ~]# cat test01.txt

\:\:\:

header--01

\:\:

body--0001-line1

body--0001-line2

\:

footer--01

\:\:\:

header--02

\:\:

body--0002-line1

body--0002-line2

\:

footer--02

[root@localhost ~]# nl test01.txt



       header--01



     1  body--0001-line1

     2  body--0001-line2



       footer--01



       header--02



     1  body--0002-line1

     2  body--0002-line2



       footer--02

[root@localhost ~]# 

 

 

 

你可能感兴趣的:(linux)