O loop while é desnecessário, pois grep tem a opção -f :
grep -f input_loan_msisdn.txt yemmy_snap* | <do other stuff with the data>
Note que se o arquivo passado para -f tem qualquer linha em branco, grep corresponde a todas as linhas, (age como cat ). Supondo que o arquivo passado para -f não possa ser editado antecipadamente, ele pode ser corrigido em tempo de execução da seguinte forma:
grep '.' input_loan_msisdn.txt | \
grep -f - yemmy_snap* | <do other stuff with the data>
De man grep :
-f FILE, --file=FILE
Obtain patterns from FILE, one per line. If this option is used
multiple times or is combined with the -e (--regexp) option,
search for all patterns given. The empty file contains zero
patterns, and therefore matches nothing.