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 sed删除多余空行 March 26, 2013 grep正则零宽断言 January 6, 2016 查看bm-cdn当前状态 October 29, 2019