Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple script to take a list of values from one file and search for it in another
BEGIN {
SUBSEP=" "
FS=","
while (getline < FILE )
{
desired_ids[$0]++
}
}
{
if ($3 in desired_ids) {
results[$2,$3]++
}
}
END {
for (i in results){
print i
}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.