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 awk的0与”0″假与真awk真假 March 16, 2015 awk奇数行二 March 18, 2016 websocket优缺点 January 13, 2016