miscoranda: by Sean B. Palmer

u scripts

I glue my computer together with a lot of utility scripts. A lot of Python utility scripts, mainly. And I have an odd convention for naming them: instead of just throwing them all in a directory somewhere and then adding that to my path, I created a script that proxies access to the scripts. It's just two lines of sh, and it's saved as "u" in my /bin:-

#!/usr/bin/sh
ONE=$1; shift 1; /home/util/${ONE}.* $*

You may have realised by now that this is insane. It means that instead of using the command, say, "cathtml" for my HTML concat program, I have to type "u cathtml". Well, yes, but consider this scenario: I create a program called "splunge" and use it a lot, referring to it in bash scripts and so forth. Then along comes the next Larry Wall or Guido Van Rossum and creates a very popular "splunge" language. Oh dear.

Now, you'll have spotted that this is very unlikely, and that there are already clashes in the *nixy world, and they're dealt with. Well perhaps, but firstly, I happen to believe that adding "u " isn't too much typing tax; and secondly, I happen to believe that not accounting for an improbable event solely on the grounds that it's improbable automagically raises the probability of the event tenfold.

Let me guess; if you had to use my computer, you'd soon be saying "fuck u"?

by Sean B. Palmer, at 2003-08-15 15:07:04. Comment?

WyPy Python Wiki · FOAFQ and Related FOAFiness

Sean B. Palmer