Ubuntu and dash

After a shell script I use broke the other day, I noticed that /bin/sh pointed to /bin/dash on my edgy desktop. I assumed at the time that I’d ended up with dash as my default sh by way of having done a pretty non-standard install. I had used instlux to install dapper. I was really impressed with how well this worked! Instlux fills a useful niche, allowing windows users to just click an icon on their desktop to install linux and it couldn’t have gone smoother. I then dist-upgraded to edgy a few weeks later and had no problems which is a great testament to Ubuntu, especially since this was long before edgy was released.

Anyway, back to dash - I’d never actually noticed it before and just assumed it wasn’t fully compliant and I just switched to bash - boom - problem solved. However, it would seem from reading this spec, that dash is now the default sh on Ubuntu. The reasoning is here on the wiki. I don’t really know enough about all this but it seems to make sense given that dash is POSIX compliant. However, I suspect that this is going to throw up a whole lot of bugs in shell scripts that contain bashisms - is that a word? I’ve already bumped into a few and they’re pretty confusing for newbies.

The other strange thing for me is that /bin/sh isn’t managed by update-alternatives. It’s simple enough to add which makes me think that there’s some compelling reason why it isn’t used. I’ve done a bit of cursory googling but haven’t found anything. I think I might start experimenting with dash to see if I can weed out a few of the bugs I think must be out there, I’d like to see if it really is a bit quicker too. I know I have no life, but it’s raining…