in reply to How to make a array of hashes and search them
Although this assumes that an ID will not match a value.grep -F -f file1 file2 file3 file4 file5
Untested Perl solution:
my %matches = map {/(.*)/, 1}, do {local @ARGV = "file1"; <>}; local @ARGV = ("file2", "file3", "file4", "file5"); while (<>) { /^(\S+)/ && $matches{$1} && print }
|
|---|