I need to go through a really large vcf file to find matching information (matching rows according to column values).
Here is something I tried so far, but it is not working and really problematic.
target_id=('id1' 'id2' 'id3' ...)
awk '!/#/' file_in | cut -f3,10-474|
for id in $target_id
do
grep "target"
done
It only loop through the file looking for the first id in the target_id list.
I'm wondering is there a way to loop through the file looking for all the ids in the target_id list? And I want to output the entire row (3rd, 10-474th column) if 3rd colmn is matching.