$ cat col 1 2 3 4 5 6 7 8 9 10 11 12 $ perl -ne 'if(++$n==2){$n=0;print $_;}else{chomp;print "$_\t"}' col 1 2 3 4 5 6 7 8 9 10 11 12