0xDECAFBAD

It's all spinning wheels and self-doubt until the first pot of coffee.

Fun with shell scripting

I went a little nuts tonight with shell scripting. It started off with a few innocent bits of cat and grep piped together. But then I invited trouble started using sed. Pretty soon, I was bringing in cut and sort and uniq. I knew I was doomed when I made the whole mess start emailing me with sendmail.

Oh, but then I went completely off the deep end. I looked up RSS 3.0, since that's so much easier to generate on the fly. I started producing that with a little help from echo and awk. From there, I whipped up a quick v3.0 to v0.91 converter so I could get something my aggregator could understand.

It was all a very iterative process down a slippery slope of geekiness, and the resulting scripts are nothing that I'd've designed as such from scratch. But, one thing led to another, and now I've got a nightly report emailed to me of pages that have gone 404 and 500, and an RSS feed of referers to boot.

I'm sure it looks like completely braindead work, but it was fun!

Archived Comments

  • Is "sort | uniq" the same as "sort -u" ? Uniq is cool, though, I'd never seen it before. And very nice scripts, it's (almost) always fun to read other peoples' code.
  • Haha. RSS 3.0 is awesome. Nothing like a little almost-rfc822 to knock some sense into the blogging world. How long has it been around? I never notice these things, I don't pay any attention to any of the blog world bullshit. (Maybe I should.)
  • > I don’t pay any attention to any of the blog world bullshit. (Maybe I should.) No! No, you shouldn't! Do not, under any circumstances, get sucked into that grungy, petty, venom-soaked little world! Anyone who knows what I'm talking about will back me up on this, including Les.