Bashisms

A while back I spent quite a bit of time writing Korn Shell scripts, but it was a while back. The last few years it’s been all Bash for me, in fact these days I try to write everything in Python.

Anyway that means that just now trying to write a POSIX Shell script has proved a little challenging.

The manual is rather long and wordy, although it seems like it’s all there. There’s the Shell Command Language, although things you think of as being part of the shell don’t seem to be – ie. “test”, which implements the “[" in "if [ x = y ]“, that’s separate.

Despite a bit of googling I couldn’t find a good list of bashisms and their POSIX replacements, there’s a few mentioned here. I did find the next better thing, a script that checks for you, “checkbashisms”, it’s in the Debian devscripts package.

And if you’re running Ubuntu you can switch to using /bin/dash for your script temporarily, if it runs under dash it’s probably pretty safe. Let’s be honest most people use bash anyway :)

If anyone does have a good list of bashisms I’d love to see it.

Posted by mike on Tuesday April 22nd, 2008, tagged with , , | 3 comments

The GDE opens

Well all of it is open now. Part of it was already opened, but who can blame the government for trying to get more media mileage out of the $120 million they’ve sunk.

Back in May last year I rode along the first section to open, and took a photo or two.

image024-modified-in-gimp-image-editor.jpg

Too bad for the birds.

At least it’ll make a great bike path in 2050 when no one can afford to drive anymore ..

Posted by mike on Tuesday April 8th, 2008, tagged with | comments disabled