title: Return variable from website Bash command
body: <p>I used to have a script which basically, returned the current temperature from a website. This was done with wget then awk to return the "Temperature" as a variable then I used sox to create a file saying the Temperature is etc.</p>
  
  <p>The website has changed and I am having trouble re-writing it.</p>
  
  <p>This is what I have:</p>
  
  <pre><code>
  URL='https://wttr.in/rhyl'
  
  temp="wget -q  -O- "$URL" | awk -F\' 'data-value/{print $1 }'| head -1)"
  
  sox -V1 -c 1  silence.wav  base.wav $temp.wav temp-dry.wav
  
  sox -V1 -m temp-bed2.wav temp-dry.wav tempfx.wav
  sox -V1 tempfx.wav tempfx+15db.wav vol 9 db
  sox -V1 temp-dry.wav temp-dry+10db.wav vol 10 db
  </code></pre>
  
  <p>I'm happy with the sox bit so far, I just cant seem to return the variable i.e. "12" from the temperature section of wttr.in </p>
  
  <p>The desired output of $temp is just number no special characters i.e $temp = 12</p>