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 ufw中转规则添加 May 16, 2016 shell颜色脚本 November 3, 2014 awk变量RS与RT May 19, 2015