Linux常用命令

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

Linux常用命令

行号靠最右显示

nl -n rn test.txt

Linux常用命令

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

nl -n rz test.txt

Linux常用命令