Lately I've really been coding to beat the band. Mostly command-line utilities written in Perl, plus a shell script here and there.
For example:
- pprom - write and use portable shell prompts (coming soon)
- mac2unix - convert line endings in a file or filter stdin
- aftermath - run a command and show what files are changed, added, or deleted
- hoy - Hack On Yaml from the command line
- ok and is - shell functions for testing shell scripts
- cvsmigrate - munge CVS files in sandbox to point to a different repository
- manpdf - view man pages as PDF (Mac OS X only at this point, but that should be easy to remedy)
aftermath will come in handy when I want to quickly see which files are being changed, added, or removed by my project Makefiles. For example, the output to the command
aftermath --command 'rm foo; mkdir bar/baz' might look like this:
A bar/baz
D foo
Plus I've already started using it with
ok and
is to test shell scripts:
--------------------- t/test1.sh ---------------------
#!/bin/sh
is $(aftermath 'myscript --foo') $(cat test1.foo) foo
is $(aftermath 'myscript --bar') $(cat test1.bar) bar
is $(aftermath 'myscript --baz') $(cat test1.baz) baz
----------------------- output -----------------------
ok 1 - foo
ok 2 - bar
ok 3 - baz
It turned out to be surprisingly easy to write - the key was to get the right incantation of
diff.
This recent flurry of coding is obviously connected to the fact that my girlfriend is out of the country for seven weeks, and I don't have much of anything better to do.
My only worry is, how much longer can I keep going at this rate?
(My only
other worry is, how long can I go without washing the dishes?)
:-)
dishclean
cog on 2004-05-27T11:24:47
You can download
dishclean from my website... wait... no, you can't
:-)