Given a file with 2 columns, a string and a filename, how can these be looped with a grep command? Would also like to direct the output to same name as SEQFILE in different folder. Believe the following is close, with correct quoting missing:
while IFS=" ", read SEQID SEQFILE
do
grep -A1 -m 1 ${SEQID} ${SEQFILE} > ./tmp/${SEQFILE}
done < missingSeq.txt
missingSeq.txtfile? Because if it is not, later occurrences will overwrite earlier.