I have a file like this naming it as file1chr1    24018319    +   achr1    24019249    +   bchr1    24020403    +   cchr1    24021281    +   dchr1    24022398    +   echr1    45241272    +   fchr1    45241812    +   gchr1    45242446    +   hchr1    45243461    +   Ichr1    45243801    +   jI have some other input files as well. They look like this:chr1    24018319    0   +chr1    24019249    22.4309 +chr1    24020403    64.302  +chr1    24021281    20.9355 +chr1    24022398    32.8987 +chr1    45241272    1.49539 +chr1    45241812    318.519 +chr1    45242446    207.86  +chr1    45243461    112.155 +chr1    45243801    67.2927 +These other files have same number of rows as compared to the first file, file1.I want to add 3rd column of every such file to the first file1(since the rows are equal) and I tried paste command but it didn't work.I want the output like this:chr1    24018319    +   a   0chr1    24019249    +   b   22.4309chr1    24020403    +   c   64.302chr1    24021281    +   d   20.9355chr1    24022398    +   e   32.8987chr1    45241272    +   f   1.49539chr1    45241812    +   g   318.519chr1    45242446    +   h   207.86chr1    45243461    +   I   112.155chr1    45243801    +   j   67.2927How can I do it. I tried thispaste -d \t file $(cut -f 3 file2) $(cut -f 3 file3)but this didn't workThanks
adding columns to a file with same number of rows
paste