title: wget grep sed to extract links and save them to a file
body: <p>I need to download all page links from <a href="http://en.wikipedia.org/wiki/Meme" rel="noreferrer">http://en.wikipedia.org/wiki/Meme</a> and save them to a file all with one command.</p>
  
  <p>First time using the commmand line so I'm unsure of the exact commands, flags, etc to use. I only have a general idea of what to do and had to search around for what href means.</p>
  
  <pre><code>wget http://en.wikipedia.org/wiki/Meme -O links.txt | grep 'href=".*"' | sed -e 's/^.*href=".*".*$/\1/'
  </code></pre>
  
  <p>The output of the links in the file does not need to be in any specific format. </p>