查询file里面空行的所在行号

grep -n "^$" file

操作如下:

[root@t-enter tmp]# grep -n ^$ yq.log
4:
7:
9:
[root@t-enter tmp]# cat yq.log
1
2
3

5
6

8

10
[root@t-enter tmp]#

 

posted on 2020-09-09 16:58  夏雨等秦天  阅读(676)  评论(0编辑  收藏  举报