查询file里面空行的所在行号
grep -n "^$" file
操作如下:
[root@t-enter tmp]# grep -n ^$ yq.log 4:7:9:[root@t-enter tmp]# cat yq.log 123
56
8
10[root@t-enter tmp]#
Linux运维面试题(1)
原文:https://www.cnblogs.com/quanyao/p/13639907.html