title: Get final URL after curl is redirected
body: <p>I need to get the final URL after a page redirect preferably with curl or wget.</p>
  
  <p>For example <em><a href="http://google.com" rel="noreferrer">http://google.com</a></em> may redirect to <em><a href="http://www.google.com" rel="noreferrer">http://www.google.com</a></em>.</p>
  
  <p>The contents are easy to get(ex. <code>curl --max-redirs 10 http://google.com -L</code>), but I'm only interested in the final url (in the former case <a href="http://www.google.com" rel="noreferrer">http://www.google.com</a>).</p>
  
  <p>Is there any way of doing this by using only Linux built-in tools? (command line only)</p>