title: How to get just current average temperature from wttr.in curl result with bash?
body: <p><a href="http://wttr.in/" rel="nofollow noreferrer">wttr.in</a> can give you the weather by curling wttr.in:</p>
  
  <pre><code>curl wttr.in/Amsterdam
  </code></pre>
  
  <p>I returns a large list of data and I want to use it as a tmux segment, so I've narrowed it down to just the first mention of temperature (which is the current temperature):</p>
  
  <pre><code>curl wttr.in/Amsterdam | grep -m 1 °C
  </code></pre>
  
  <p>Which sometimes returns a range:</p>
  
  <pre><code>_ /"".-.     4 – 7 °C
  </code></pre>
  
  <p>And sometimes a single temperature:</p>
  
  <pre><code>_ /"".-.     13 °C
  </code></pre>
  
  <p>So there's still some garbage in front of it, and it sometimes returns a range instead of a single temperature. Does anyone know how I can narrow this down to always return a single temperature (averaged if there's two values) and without the preceding text?</p>