/bin/sh different than bash in fedora 11
Cameron Simpson
cs at zip.com.au
Sat Jun 20 01:05:28 UTC 2009
On 19Jun2009 10:42, Herbert Gasiorowski <gasi3 at web.de> wrote:
| The following to commands act different - though sh is just a link to bash:
|
| > bash -c ". config"
| > sh -c ". config"
| sh: line 0: .: config: file not found
|
| this happens after switching from Fedora 10 to 11
|
| Is this a bug or my fault?
It's a feature. When bash is invoked as sh it behaves in a more POSIX
compliant manner. You can expect gratuitous bash behaviours to not
always work.
In this case I suspect (untested) that "config" is not an executable file.
I strongly recommend that you try to always work with "sh" unless
there's some amazing reason to rely on bash; that way your code will be
portable to other UNIX systems. They all have "sh" but not all have
bash.
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
Sometimes you just need to look reality in the eye, and deny it.
- Garrison Keillor
More information about the fedora-list
mailing list