awk and sed使用

awk '{if(NR%10==0){printf $0 ",\n"}else{printf "%s,",$0}}' file

每十行合并一行

你可能感兴趣的:(互联网,linux)