My current solution:
#!/bin/sh
while read file2
do
grep $file2 file1
done
the contents of file1 will be something like:
atlanta,blue,20090805
newyork,blue,20090805
washington,blue,20090805
dallas,blue,20090805
jacksonville,blue,20090805
the contents of file2 will be something like:
newyork
dallas
jacksonville
and the desired output to a file would be something like:
newyork,blue,20090805
dallas,blue,20090805
jacksonville,blue,20090805
when seeking a subset of a large list based on names from a second list, what is the best way to do something like this? any recommendations would be appreciated!
Thanks,