首页 > 系统服务 > 详细

Linux运维面试题(1)

时间:2020-09-09 17:59:39      阅读:78      评论:0      收藏:0      [点我收藏+]

查询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]#

 

Linux运维面试题(1)

原文:https://www.cnblogs.com/quanyao/p/13639907.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!