194. Transpose File ¶ Bash 1 2 3 4 5 6 7 8 9 10 11 12 13awk '{ for (i = 1; i <= NF; ++i) { if (NR == 1) { arr[i] = $i; } else { arr[i] = arr[i] " " $i; } } } END { for (i = 1; i <= NF; ++i) { print arr[i]; } }' file.txt