I compare two files with this command
comm -13 file1 file2
It works perfectly and says me differences. But I would like to show me also the line number (lines unique in second file).
file1:
a
d
e
f
g
file2:
a
b
c
d
e
I do:
comm -13 file1 file2
Output
b
c
But I need the line numbers where b and c are in file2, desired output:
2
3
e.g. Using a modified
file2
that includes an extrad
line to prove that duplicate values are handled correctly: