title: How to extract a link from an html file using bash
body: <p>I am trying to create a shell file that will grab all of the images from the toplist of <code>wallbase.cc</code>.  So far I have it so that it curls the html code (<code>using mac so no wget</code>), and grabs all the links to the images.  The only problem I am having is that when I grep for the links it returns <code>&lt;a href=link&gt; &lt;target=blank&gt;</code>.  What I am trying to do is extract the link so that I can curl it into a file.  I thought about using an external Java or C file to extract the links but I figure there is a pure bash way to do it.  </p>
  
  <p>Any help would be great.</p>
  
  <p>edit: my commands so far</p>
  
  <p>grep <code>&lt;a href="http://wallbase.cc/wallpaper/' wallbase.source</code></p>
  
  <p>This returns all of the links including the html code.
  I just need to pipe this with some command in order to strip the html and leave the links</p>