awk偶数行二 root@bwhhkle:~# cat e 1a 2b 3c 4d 5e 6f 7g root@bwhhkle:~# awk '{if(getline)print}' e 2b 4d 6f 必须使用if判断一下,否则会输出最后一行,即使最后一行为奇数行 Tags: awk, awk详解, getline Read more articles Previous Postawk重复行 Next Postawk变量RS与RT You Might Also Like 踩坑必备shell详解 July 16, 2015 sed行首行尾 April 13, 2016 curl方式执行shell脚本时如何传参 May 6, 2015