I have the following list in filemore file.exefifc1ahygg4ahdy5dnhdw4swesf3afjfhyrjfhggsfarhow to append any second list after the first list and any third list after the second list the following:efifc1a   nhdw4s     jfhghygg4a    wesf3a     gsfarhdy5d     fjfhyr
awk + how to append list in file
linux;bash;awk;sed
How aboutawk '  BEGIN {FS=\n; RS=\n\n+}  {for (i=1;i<=NF;i++) a[i] = a[i] == ? $i : a[i]\t$i; next}  END {for (i in a) print a[i]}' file.exTesting:awk '>   BEGIN {FS=\n; RS=\n\n+}>   {for (i=1;i<=NF;i++) a[i] = a[i] == ? $i : a[i]\t$i; next}>   END {for (i in a) print a[i]}> ' file.exefifc1a nhdw4s  jfhghygg4a  wesf3a  gsfarhdy5d   fjfhyr  If you're not stuck on using awk, you could do it using autogen's columns command and the transpose command described here Transposing rows and columns e.g. columns -c3 < file.ex | tr -s ' ' '\t' | transpose -t