Linux常用命令 - nl命令详解

21篇测试必备的Linux常用命令,每天敲一篇,每次敲三遍,每月一循环,全都可记住!!

https://www.cnblogs.com/poloyy/category/1672457.html

 

显示行号,除了空行

默认就是这个

nl test.txt
nl -b t test.txt

 

无论是否为空行,都显示行号

nl -b a test.txt

 

行号靠最左显示

nl -n ln test.txt

 

 

行号靠最右显示

nl -n rn test.txt

 

 

行号靠最右显示,不足位数左边补0

nl -n rz test.txt

 

posted @ 2020-03-31 23:40  小菠萝测试笔记  阅读(1380)  评论(0编辑  收藏  举报