I have searched online for 10 hours now and tried various codes, but still need help. I am attempting to merge three files using 'paste' and 'awk'. However, the columns are not adjusting to the longest string of characters. All files are formatted in the same manner as below. F gge0001x D 12-30-2006 T 14:15:20 S a69 B 15.8M gge06001P 30.1Below is my faulty code.$ paste <(awk '{print $1}' lineid) <(awk '{printf(%-13.10s\n, $1)}' gge0001x) <(awk '{printf(%-13.10s\n, $1)}' gge0001y) <(awk '{printf(%-13.10s\n, $1)}' gge0001z)This code results in misaligned columns as pictured below.I would greatly appreciate your help.Input File 1F D T S B M P  Q  R  U  X A    G    H  O  C  K  W  L  Input File 2gge0006x12-30-200614:05:23a6915.4gge0600130.8 19.2 1006.2 1012.7 36.238.994   107.71   8.411 37.084 7.537 28.198 212.52 68.1Input File 3gge0006y12-30-2006 14:05:55a6915.3gge0600130.6 21.1 1006.6 1014.6 36.138.994   107.71   8.433 36.705 7.621 27.623 210.51 68 Input File 4gge0006z12-30-200614:06:28a6915.7gge0600130.3 23.5 1008 1014.1 36.638.994   107.71   8.434 36.508 7.546 27.574 208.08 67.6 Results for paste file1 file2 file3 file4 | column -t
Format Column Width with Printf
bash;awk;printf;paste
Your input files have DOS \r\n line endings. Remove the carriage returns with the dos2unix command or with sed -i 's/\r$//'