还是awk和sed两个老伙计

只有2行的情况:sed 'N;s/\n/\t/g' file
只有3行的情况:sed 'N;N;s/\n/\t/g' file
xargs -n2 <file(不适用于每行多列的情况)

假如有n行,每行不只一列:
awk '{if(NR%2==0)print ;else printf "\t"}' file #2行并为1行
awk '{if(NR%3==0)print ;else printf "\t"}' file #3行并为1行