you can use this code if your PHC line always starts with "PHC"
here pattern.txt contain your pattern list
and mint.txt contains your data
while read pat
do
count=2
while read line
do
b=`echo $line|grep PHC`
if [ $? -eq 0 ]
then
if [ $count -eq 1 ]
then
break;
break;
fi
a=`echo $line|grep $pat`
if [ $? -eq 0 ]
then
count=`echo "$count-1"|bc`
fi
fi
if [ $count -eq 1 ]
then
echo $line
fi
done<mint.txt
done<pattern.txt