(bash -> sh) bash does not behave like standard Bourne Shell
Bash Shell is a symbolic link to Bourne Shell by default, but it does not
behave the same. Some of shell scripts written for Bourne shell are broken,
because they expect to find "generic Bourne."
see simple example:
$ bash -c 'echo "\ntext\c"'
$ ksh -c 'echo "\ntext\c"'
There problem could be corrected by changing symbolic link to "sh" from
"bash" to "ksh" (pdksh), but this breakes startup init scripts written in
Bash and using "#!/bin/sh" in first line...
$ cd /etc/rc.d/init.d
$ grep \^#! *
The solution would be to make sure that all Bash scripts on the system
are using correct first line "#!/bin/bash"
The most obvious fallacy about this bug report is that it compares the action of
bash to ksh and then assumes that ksh and sh behave the same. The problem with
that fallacy is that sh itself behaves differently on different systems.
As an example of this, I tried the first example above on two different systems
I have access to that have what claims to be the standard Bourne shell, one a
Sun Solaris, the other an Irix, and they responded as follows:
Sun: # sh -c 'echo "\ntest\c"'
Irix: # sh -c 'echo "\ntest\c"'
Quite clearly, the Irix doesn't understand \c and so just ignores the \ and
prints out the c, whereas the Sun actually understands it.
My argument here would be to state that as sh itself appears not to have a
standard implementation, there is no means by which any shell can claim to
conform to that non-existant standard...
I have check on Solaris and Irix also. Actually, Bourne Shell on Solaris
does it correctly in interactive mode, but on Irix is messed up.
I pointed this in the first place only as an example. That inconsistency between
the shells (and Bourne shells) is _the_problem_. I can be open on my first issue
with symbolic link to "sh," but I _still_ think all scripts should be revised
and correct syntax in the first line should be kept (#!/bin/*sh) to eliminate
any possible confusions.
We're trying to use /bin/bash where bash specific features are used; the scripts that use /bin/sh shouldn't have any bash specific things in them.
If you notice any problems in the scripts that have /bin/sh, please report them to the package owning the scripts, because that's where a fix is needed -
it's not a bug in bash.