Rob Landley (landley) wrote,
Rob Landley
landley

  • Location:
  • Mood:

A quick toy to fetch raw patches from spinics.net archives.

#!/bin/bash

wget "$1" -O - | sed -n '/<pre>/,/<\/pre>/b next;b;:next;s@</*pre>@@;s/&gt;/>/g;s/&lt;/</g;s/&quot;/"/;s/&amp;/\&/g;p'

Usable for example:

./rawfetch.sh http://www.spinics.net/lists/linux-nfs/msg18151.html > out1.patch

(I note that escaping the above sed expression so that it showed up properly in this livejournal post was almost as much work as writing it.)
Tags: dullboy
Subscribe
  • Post a new comment

    Error

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments