Compare columns 1 and 2 for File1 and File2. Stop the comparision at the fisrt time the values does not match and exit the process
File1
1 31789.00 37145.00
1 32221.00 37145.00
1 56783.00 37145.00
1 32223.00 37145.00
1 31793.00 37145.00
File2
1 31789.00 37145.00
1 32221.00 37145.00
1 31791.00 37145.00
1 32223.00 99999.00
1 31793.00 37145.00
I tried
awk 'NR==FNR{a[$0];next}(!($0 in a)){print}' File1 File2
I don't want to show lines which does not match, I will like to stop the process on error and say the line where the error is found
Something like that:
Error found in line 3