file1: A list of keys, one key one line
file2: A table, the keys are in column 1
what this does: pull out the lines from the table which match a key from a list
time awk -F' ' 'NR==FNR{c[$1]++;next};c[$1] > 0' file1 file2 > output.txt
Modified from: https://unix.stackexchange.com/questions/334448/if-column-matches-another-file-print-every-line-with-match-awk-grep