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 awk语句块 May 20, 2013 curl方式执行shell脚本时如何传参 May 6, 2015 awk合并行 September 5, 2016