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 awk奇数行awk偶数行 September 18, 2014 awk去重awk奇数行 March 17, 2016 awk数组awk详解 January 16, 2015