Padding Numbers in Filenames

I sometimes find myself with scads of files in a directory that, due to the vagaries of sort() do not show up in the “right” order. For example, 1.png, 2.png, … 751.png.

I was poking around with rename, but I wasn’t finding a good way to do this. Thankfully, a poster on TLUG showed me how to use sprintf to get the results I wanted, like so:

rename -n 's/(\d+)/sprintf("%04d", $1)/e' *.png

Very neat.

Not dead, just parenting…

I’ve been meaning to write here for a while, but between a crazed toddler and a new job and very, very occasional sleep, I haven’t gotten around to it. However, this post suggests that that might be changing :-) We will have to see.

Brain Dumping

I am taking a leave from work starting today, but for the last month I have been dumping everything I know into other people so that they can approximate my job while I’m off. The problem is that much of my job is about fighting fires and doing tiny, technical things, and I have no idea how efficiently I have dumped my brain, or how much I have totally failed to relate.

There is no good way to know what you know – there is no feasible method to list your mind’s contents, and, knowing even obliquely the nature of the mind, it could easily spool off infinitely. The best you can do is to hope that others are able to figure out the easy drudgery of your job and be hopelessly in your debt for the interesting things that you do, so you are appreciated without having to be buried in minutia when you return.