title: Remove %0D from variable in BASH
body: <p>I'm trying this:</p>
  
  <pre><code>token=`curl -I --header "X-Auth-User: user@user.com" --header "X-Auth-Key: XXXXXXXXXXXXXXXXXXXXXX" api.server.com | grep -Fi X-Auth-Token | awk -F" " '{ print $2}'`
  
  /usr/bin/wget --accept .jpg,.jpeg -p "https://api.server.com/v1/stats/1/graph?callback=jQuery171027000000144289315_1380000003353&amp;mnum=1&amp;res_type=cpu&amp;g_type=6h&amp;graph_type=img&amp;full=1&amp;w=515&amp;h=150&amp;X-Auth-Token=$token" -O "image.jpg" || rm "image.jpg"
  </code></pre>
  
  <p>But my token result is:</p>
  
  <pre><code>https://api.server.com/v1/stats/1/graph?callback=jQuery171027000000144289315_1380000003353&amp;mnum=1&amp;res_type=cpu&amp;g_type=6h&amp;graph_type=img&amp;full=1&amp;w=515&amp;h=150&amp;X-Auth-Token=SERVER_018d8100000000001d1b817f7d58a6%0D
  </code></pre>
  
  <p>Instead of:</p>
  
  <pre><code>https://api.server.com/v1/stats/1/graph?callback=jQuery171027000000144289315_1380000003353&amp;mnum=1&amp;res_type=cpu&amp;g_type=6h&amp;graph_type=img&amp;full=1&amp;w=515&amp;h=150&amp;X-Auth-Token=SERVER_018d8100000000001d1b817f7d58a6
  </code></pre>
  
  <p>How to remove %0D (Carriage return)?</p>