I tried many things but most of them just got stuck or didn't remove the duplicates properly. It doesnt matter if the output file is sorted or not
If file1.txt contains
a
b
c
d
e
c
d
If file2.txt contains
c
d
e
a
f
g
g
h
output.txt should contain
a
b
c
d
e
f
g
h
sort -u first.txt second.txt third.txt >output.txt
but this is what i got. The duplicates didn't get removed – Aeden Thomas Apr 06 '20 at 07:11