awk删除空行 # sed删除空行非常简单,awk也不麻烦 root@bwhhkle:~# cat a 1 2 3 4 root@bwhhkle:~# awk 'NF' a 1 2 3 4 NF为空时即为假,不执行输出 root@bwhhkle:~# awk '/./' a 1 2 3 4 正则方式,只要匹配到一个字符即为真,否则为假 Tags: awk, awk详解 Read more articles Previous Postawk拆分行 Next Post域名证书有效期检测 You Might Also Like bmApp服务重启脚本 November 18, 2019 awk数组awk详解 January 16, 2015 awk语句块 May 20, 2013