本文共 124 字,大约阅读时间需要 1 分钟。
awk '{if(NR%2==0){printf $0 "\n"}else{printf "%s:",$0}}' file
sed 'N;s/\n/ :/' file
转载于:https://blog.51cto.com/soige/1717516