1

I have a shell script that I am asking to print the columns I pasted together. Then I'm asking it to realign the columns after its pasted and then take out the ^M character .

My code is

paste file1.1 file2.1 file3.1 > mega
column -t mega | tr -d \\015

This is what I get

gge0006x   gge0006y   gge0006z
12-30-2006   12-30-2006   12-30-2006
14:05:23   14:05:55   14:06:28
a69   a69   a69
15.4   15.3   15.7
gge06001   gge06001   gge06001
30.8   30.6   30.3
19.2   21.1   23.5
1006.2   1006.6   1008
1012.7   1014.6   1014.1
36.2   36.1   36.6
38.944   38.944   38.944
107.71   107.71   107.71
8.411   8.433   8.434
37.084   36.705   36.508
7.537   7.621   7.546
28.198   27.623   27.574
212.52   210.51   208.08
68.1   68   67.6

What I want is

gge0006x     gge0006y     gge0006z
12-30-2006   12-30-2006   12-30-2006
14:05:23     14:05:55   14:06:28
a69          a69       a69

With all of the columns aligned like this with all the same words as the first one. I shortened it just for example.

What is the best way that I can make my script take the file and take out the hidden characters while realigning the columns back to columns? The files that I pasted were all one column each and all aligned previously, before the merge.

0 Answers0