I would like to compare the two files, and only print this line and append it to "source.txt":
Here are my files:
DATETIME,IPSOURCE,PORT 01.01.70 08h00,0.0.0.0,443 01.01.70 08h00,22.214.171.124,443
DATETIME,IPSOURCE,PORT 01.02.70 09h00,0.0.0.0,443 01.02.70 09h00,126.96.36.199,443 01.02.70 08h00,188.8.131.52,443
I don't care about the DATETIME field in the comparison, I only want to add the new IP that appears in the log file "events.txt" to "source.txt" (addresses 0.0.0.0 and 184.108.40.206 appear in the two files).
So I want to use
grep -vxFf source.txt events.txt
without taking the first field into account, I look only for differences in the IPSOURCE field (second column).