[AMBER] /bin/sh /bin/dash

From: Francesco Pietra <chiendarret.gmail.com>
Date: Sat, 2 Jul 2011 19:08:30 +0200

I am at amber10/ambertools1.2 with Denian amd64 wheezy and met the
same issue discussed below on the Amber web site:

As for confirmation about /bin/sh, I too use Ubuntu. The first thing I did
when I began setting up my environment was to redirect /bin/sh to /bin/bash
rather than /bin/dash, since it causes a lot of headaches. You could, of
course, go through the Amber source tree and change #!/bin/sh to #!/bin/bash
to make it use the proper shell, but this issue is pervasive enough that I
think it is worth changing /bin/sh permanently.

If you google "Bad fd number", you will see countless hits of people saying
"Ubuntu links /bin/sh to dash rather than bash." (since /bin/sh is a
symbolic link to /bin/dash). The almost unanimous fix for this issue is
something along the lines of "sudo rm /bin/sh; sudo ln -s /bin/bash /bin/sh"
to make /bin/sh point to /bin/bash. It would be worth seeing if this fixes
the issue.

Any script that uses #!/bin/csh should be fine since it explicitly calls
cshell as long as you have cshell installed (which Ubuntu does NOT come with
by default, but can be obtained via apt-get install csh). Same with

Hope this helps,

The suggestion helps but the solution should be quite another. /bin/sh
was made dash because it is smaller and faster. In a code uses bash,
it had to state that explicitly. One can't imagine if it is bash or
something else. In my view the solution is to fix the buggy script.

francesco pietra

AMBER mailing list
Received on Sat Jul 02 2011 - 10:30:03 PDT
Custom Search