August 20th, 2005


(no subject)

Got up really late this morning (i.e. 11), and I'm sooooo sleepy.

Andy's in town for the weekend, so Mike and I had dinner (mmm, raw fish) and went over and paid him a visit.

Then I got home and called queueball, and we stayed up till, say, 5 AM... >_>

I've been in a reclusive, wanting-to-stay-at-home-and-do-shit sort of mood pretty consistently lately. This has meant good things for MetaFS, and not-as-good-but-still-good things for school and life in general ... but it also means I've been antisocial. I'm thinking today will be no exception, even though Andy's here. (Of course, he's going to be back in a few weeks when he moves in for school, but still ... he's down for the weekend, I should make the effort to be friendly.)

I dunno. Maybe I'll get some more Physics shit done here, and take the laptop with me over there and finish stuff up while pretending to be social. We'll see.

Now pondering walking over to Starbucks and getting some caffeine, so I can, you know, get this day started. ;P

-- Des
  • Current Mood
    sleepy sleepy

Nifty Perlage

I had a shitload of Kyou Kara Maou eps that had messed-up filenames, so I wrote myself a nifty little Perl script that renames lots of files based on a (series of) regular expression(s) (actually, they can be arbitrary Perl statements that manipulate $_, but ssshhh ... don't tell anyone!).

I don't know how many times I've needed to do something like this, and I'm surprised I haven't found a UNIX tool that does this already.

Collapse )

The command that fixed them all was this: -r 's/_/ /g' -r 's/\[(.*?)\] (.*?) \[(.*?)\]/$2 [$1] [$3]/' *


-- Des
  • Current Mood
    geeky geeky