If I have 2 files where the first lines contain identical headings:
A.txt:
A 1 aa B.txt
A ee 7 I want to combine them like so:
C.txt
A 1 aa ee 7 Is there a one liner to do this?
If I have 2 files where the first lines contain identical headings:
A.txt:
A 1 aa B.txt
A ee 7 I want to combine them like so:
C.txt
A 1 aa ee 7 Is there a one liner to do this?
If order is not a problem:
sort A.txt B.txt | uniq
Here's another way that's easily scalable to any number of input files (just add them as additional arguments:
awk 'FNR!=NR&&FNR==1{next}{print}' A.txt B.txt > C.txt