Suppose I have 2 Files, ABC.txt & DEF.txt with the data shown below as an example:
abc 14 dka 1 def 51
def 12 ckd 41
I want to grep column 1& 2 from both files and write into a third file so that third file contain both file without any repeated column 1 and thire value put for two file and put zero for values that didn't exit in files. How can it be done?
My expected output is (output:
ABC DEF abc 14 0 ckd 0 41 def 51 12 dka 1 0