awk奇数行awk偶数行 sed奇偶数行非常简单,awk也不算麻烦 root@mail ~ # cat a 1 2 3 4 # 输出奇数行 root@mail ~ # awk '{print;getline}' a 1 3 # 输出偶数行 root@mail ~ # awk '{if((getline)>0){print}}' a 2 4 Tags: awk偶数行, awk奇数行, awk详解 Read more articles Previous Postawk语句块 Next Postawk数组awk详解 You Might Also Like sed正则 February 25, 2015 zabbix添加agent主动模式 December 16, 2014 域名证书有效期检测 March 13, 2017