linux - Column matching -


deleted

deleted deleted

deleted

deleted deleted deleted

first, pre-processing. remove headers (the first 2 lines in both files). then, make tab field separator. sort on second field , b on first field. lets leads files "a" , "b". then, join command can used.

$ cat eva high school f bill    post graduate   m eddie   post graduate   m john    unviersity  m mary    unviersity  f peter   unviersity  m $ cat b high school b post graduate   c unviersity  $ join -12 -21 -t$'\t' b  high school eva f   b post graduate   bill    m   c post graduate   eddie   m   c unviersity  john    m   unviersity  mary    f   unviersity  peter   m   

you can run final output through awk required format.


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -