merging two files

前端 未结 3 518
無奈伤痛
無奈伤痛 2021-01-18 12:39

I have two files (tab delimited) one file is has 4 columns and n number of rows and second file has 2 columns and n number of rows.

column 4 of first file is identic

相关标签:
3条回答
  • 2021-01-18 13:26

    For tabulator try

    join -t \t files1 …
    
    0 讨论(0)
  • 2021-01-18 13:35

    Have a look at the join command, see guide here

    0 讨论(0)
  • 2021-01-18 13:38

    try with join

    join FILE1 FILE2 -1 4 -2 2 -t"tab"

    to express a join between the files FILE1 and FILE2 based on the 4th field (-1 4) of FILE1 and the 2nd field (-2 2) of FILE2

    0 讨论(0)
提交回复
热议问题