July 31, 2007

Harry Potter Frustrations

Filed under: Uncategorized — alsuren @ 11:52 pm

Am I the only one who wishes he could do this:

cat hp7.txt | sed -e %s/round/around/g \
| sed -e %s/[.][^.]*(that had nothing to do with)[^.]//g \
> hp7_slightly_less_annoying.txt

I'm halfway through, and I'm off to bed now. I will doubtless finish it



  1. Many lols. Can I quote this to my techie friends in a list email?

    I do agree with you though – she rambles a bit in all the books, and there’s nothing necessarily wrong with that (c.f. Tolkien, D. Adams…) but in the final part of a 7-part saga, you JUST WANT TO KNOW IF/HOW THEY KILL V— :). I finished it a few days ago, and it’s well worth sticking with the annoying lack of directness in the prose!

    Comment by Stuart — August 1, 2007 @ 9:00 am

  2. Either you haven’t read the command carefully enough, or I made an error in constructing it. It *should* be valid bash/sed

    The command I speak of refers to her proof-reader failing to check for instances of ’round’ that should (in my mind) be ‘around’, and constructions like ‘He felt a cold in his stomach that had nothing to do with the ice-cream.’ Which should just be plain *removed* to reduce cringing.

    Comment by alsuren — August 1, 2007 @ 9:17 am

  3. I didn’t read it carefully enough. I’m still getting to grips with regexps 🙂

    Though I HAVE decided to track down a copy of Linux In A Nutshell, as I have lots of book vouchers to use up…

    Comment by Stuart — August 2, 2007 @ 11:03 am

  4. O RLY?

    … forgive me.

    I finished HP7 last week. I don’t know, I’ve come to expect this sort of meandering J.K., so it was no bother. I’m not reading her books to go anywhere (other than Voldemort’s ultimate demise) so any meandering done is all for the good. Cringe to that. 😉

    A phrase I kept catching was the peculiarly British “have done”. Ah, well, it’s your language, I’m just borrowing it.

    Comment by Jared — August 2, 2007 @ 7:20 pm

  5. @stuart: Let’s be fair: Unix regexps have the nastiest, most counter-intuitive syntax ever, but they’re too “powerful” for anyone to drop, and there are too many perl programmers that think the syntax is really good and simple (which it probably is, compared to perl). I only use regexps with sed, and I try to make them as linear and straightforward as possible.

    @jared: as in “Have done with it”? She does use that more than is usual. It’s more “Weasley” than “British”, in my association.

    And what’s this idea that everyone has about rambling? Her books ramble no more than my mind usually does… though I wasn’t entirely convinced by the massive chunk of blatant Snape-based fanservice that she dropped right in the middle of the final battle sequence. (and don’t try to tell me that that’s a spoiler, because everyone knew that both were going to appear in the last book, but not that they were going to be inter-twined.

    Comment by alsuren — August 2, 2007 @ 7:59 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: