at the head of your script your going to make sure your running in the BASH shell.

If you use

#!/bin/sh

your going to use WHATEVER shell is linked to sh. This is "normally" bash in most distro's....... Ubuntu in their "infinate" wisdom, thinks that linking sh to /bin/dash (the dash shell) is the way to go. I never use dash myself, I've always used bash or ksh. Simply putting the correct shebang line at the top of your scripts will solve any issues with regards to what your script is going to run in.

You can modify your Ubuntu system's /bin/sh symlink to point to /bin/bash:

1. If am executing the shell script using absolute or relative path, then interpreter used would be the one mentioned as sha-bang header.
2. And if I am using "sh" to invoke the shell script, interpreter used would be the one linked with "/bin/sh"

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum