title: How to check broken links in a webpage?
body: <p>I maintained a list of links to some resources in my blog.<br>
  If I find a link is broken, I add a <code>class="broken"</code> to it.<br>
  Sometimes the broken links go to alive again, so I remove the <code>class="broken"</code>.<br>
  When the list goes very long, it's very hard to check them one bye one.</p>
  
  <pre><code>&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://www.a.com"&gt;a&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.b.com"&gt;b&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.c.com" class="broken"&gt;c&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://www.d.com"&gt;d&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>How to write a <code>bash</code> script to do the editing?</p>