Probably there is a shorter one liner than this:
perl -F: -ane 'BEGIN {open K, "<file2"; $h{0+$_}=1 for <K>} print if e +xists $h{$F[0]}' file1
In reply to Re: extract line
by Loops
in thread extract line
by lallison
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |