I am trying to get the difference in two text files. However, the first line can always change. For this reason, I did this with python:
tail -n +2 file1
tail -n +2 file2
Then, for comparison, I compare the results with the outputs.
However, I would like to use awkor sed, if possible.
What I have found so far:
awk 'NR == FNR { A[$0]=3; next } !A[$0]' file2 file1
but it compares to the first line.
How can I distinguish from the second line?
source
share