Skip to main content
added 30 characters in body
Source Link
RudiC
  • 9k
  • 2
  • 12
  • 22

With join (GNU coreutils) 8.30 and "process substitution", you may try

join -a1 -a2 -t"    " -oauto  -e " " <(join -a1 -a2 -t" " -oauto  -e "" file[12]) <(join -a1 -a2 -t"    " -oauto  -e " " file[34])
abc 1   2        
def 2       1    
ghi 3   3   2   3
jkl         4   4

The -t options have a character<TAB> character value.

With join (GNU coreutils) 8.30 you may try

join -a1 -a2 -t"    " -oauto  -e " " <(join -a1 -a2 -t" " -oauto  -e "" file[12]) <(join -a1 -a2 -t"    " -oauto  -e " " file[34])
abc 1   2        
def 2       1    
ghi 3   3   2   3
jkl         4   4

The -t options have a character value.

With join (GNU coreutils) 8.30 and "process substitution", you may try

join -a1 -a2 -t"    " -oauto  -e " " <(join -a1 -a2 -t" " -oauto  -e "" file[12]) <(join -a1 -a2 -t"    " -oauto  -e " " file[34])
abc 1   2        
def 2       1    
ghi 3   3   2   3
jkl         4   4

The -t options have a <TAB> character value.

Source Link
RudiC
  • 9k
  • 2
  • 12
  • 22

With join (GNU coreutils) 8.30 you may try

join -a1 -a2 -t"    " -oauto  -e " " <(join -a1 -a2 -t" " -oauto  -e "" file[12]) <(join -a1 -a2 -t"    " -oauto  -e " " file[34])
abc 1   2        
def 2       1    
ghi 3   3   2   3
jkl         4   4

The -t options have a character value.