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 mysql备份清理脚本 June 8, 2017 分发执行检查cdn状态脚本 October 29, 2019 Forticlient连接错误 July 12, 2015