Send the curl output to a new file. For example in the above mentioned case.
curl "http://tmg.xunta.gal/consulta-tarxeta?blah_blah_blah&numero=$1" | tee -a /var/tmp/mycurl
curl "http://tmg.xunta.gal/consulta-tarxeta?blah_blah_blah&numero=$1" | tee -a /var/tmp/mycurl Now all you need to do is grep your line from this new fielfile.
cat /var/tmp/mycurl | grep Non hai ningunha recarga para o número de tarxeta introducido.
cat /var/tmp/mycurl | grep Non hai ningunha recarga para o número de tarxeta introducido.