AMBER Archive (2008)

Subject: Re: AMBER: Install problems

From: M. L. Dodson (
Date: Tue Sep 09 2008 - 13:41:07 CDT

See below.

Mark Williamson wrote:
> David A. Case wrote:
>>> 9) There is an issue with the MOPAC wrapper script that will cause it
>>> to fail with Ubuntu's default /bin/sh (dash). Fix it by telling it to
>>> use bash:
>> ??? Do you know what the problem is with dash? This is about as simple
>> a shell script as one could come across, so what is failing?
> The testcase problem appears as this:
> Now, Ubuntu uses /bin/dash (Debian Almquist shell) as it's /bin/sh. I
> think this was because this is faster than bash and hence speeds up boot
> times with respect to initialization scripts. There is more information
> on the reasoning behind this policy at:
> Returning to line 12; I'm not sure if " >& " is a bash specific
> extension or there is an issue with dash. All I know at this moment is
> that changing the first line of the script to use bash resolves
> this issue for me. I recall Ross mentioning that was a fix in CVS for it
> already where it has been changed to ".../bin/mopac > mopac.out"
> regards,
> Mark

The ">&" construct is a csh redirection that has been implemented in
bash. It is one of the most prevalent "bashisms" the Linux people
visit on all us poor "non-Linux" people, in my observation. Those
generating #!/bin/sh scripts should pay particular attention to this
if their environment is Linux. A proper "real" /bin/sh redirection

command 2>&1 > foo

Kochan and Woods, Unix Shell Programming, page 298
This means "... redirect standard error to standard output (your
terminal by default) and then standard output to foo."

There is nothing wrong with using bash (or csh), but PLEASE make the
first line #!/bin/bash if you use bash extensions. (My bash ends up
in /usr/local/bin/bash, but I am certainly capable of making a soft
link to /bin/bash).

Bud Dodson

M. L. Dodson
Business Email: activesitedynamics-at-comcast-dot-net
Personal Email:	mldodson-at-comcast-dot-net
Phone:	eight_three_two-56_three-386_one
The AMBER Mail Reflector
To post, send mail to
To unsubscribe, send "unsubscribe amber" (in the *body* of the email)