I just found out that on Ubuntu, /bin/sh is a symlink to /bin/dash, not to /bin/bash. Apparently this was changed to make booting up a little bit faster.
In any case, it might mean that many of your scripts won’t work because they are starting with ‘#!/bin/sh’. Instead, you should have them point directly to /bin/bash. Here’s a one line script that will update all the scripts in a directory:
find . -type f | xargs sed -i ‘s_#!/bin/sh_!/bin/bash_’
July 4, 2011 at 12:43 pm
Thank you for that – exactly what I was looking for 🙂
/ KingNeutron
May 28, 2013 at 5:52 am
There is definately a lot to find out about this issue.
I like all of the points you have made.