Last active
June 16, 2023 18:41
-
-
Save neontorrent/cf96eb49f5e76e6b3698a32a970bbc7b to your computer and use it in GitHub Desktop.
Find missing records in A.txt, but not in reference set B.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
awk 'NR==FNR{a[$0]=1;next}!a[$0]' B A | |
# or better memory usage: | |
awk 'NR==FNR{a[$0];next} !($0 in a)' B A | |
grep -Fvx -f B.txt A.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment