我有2个管道有限档案。 昨天和今天。 txt
昨天txt:
1234|12|Bill|Blatt|programmer
3243|34|Bill|Blatt|dentist
98734|25|Jack|Blatt|programmer
748567|31|Mark|Spark|magician
今天,txt
123|12|Bill|Blatt|programmer
3243|4|Bill|Blatt|dentist
934|25|Jack|Blatt|prograbber
30495|89|Dave|Scratt|slobber
I would like to compare the 2 files while ignoring the first 2 fields and output any lines unique to the second file (今天,txt), but I want the full lines even though the comparison is omitting the first 2 fields. So in the case above the output would be:
new_今天,txt
934|25|Jack|Blatt|prograbber
30495|89|Dave|Scratt|slobber
我试图利用这一点:
sort <(cut -d"|" -f3- yesterday.txt) <(cut -d"|" -f3- yesterday.txt) <(cut -d"|" -f3- 今天,txt) | uniq -u
这几乎是行之有效的,但它给我留下了我削减的2个领域。 我不知道如何做到这一点。 任何帮助都会受到高度赞赏。