对文本进行按行、内容拆分
awk 'NR%12==1{close(p".txt");++p}{print > p".txt"}' file
awk '/index/{close(p".txt");++p}{print > p".txt"}' file
参考
https://github.com/jlevy/the-art-of-command-line/blob/master/README-zh.md
对文本进行按行、内容拆分
awk 'NR%12==1{close(p".txt");++p}{print > p".txt"}' file
awk '/index/{close(p".txt");++p}{print > p".txt"}' file
参考
https://github.com/jlevy/the-art-of-command-line/blob/master/README-zh.md
转载于:https://www.cnblogs.com/blue-sea-sky/p/5478970.html