Skip to main content
improved formatting
Source Link
Thomas
  • 6.7k
  • 8
  • 31
  • 34

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. 

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

Now all you need to do is grep your line from this new fiel.

cat /var/tmp/mycurl | grep Non hai ningunha recarga para o número de tarxeta introducido.

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 

Now all you need to do is grep your line from this new file.

cat /var/tmp/mycurl | grep Non hai ningunha recarga para o número de tarxeta introducido. 
Source Link

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

Now all you need to do is grep your line from this new fiel.

cat /var/tmp/mycurl | grep Non hai ningunha recarga para o número de tarxeta introducido.