Re: /bin/sh different than bash in fedora 11

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19Jun2009 10:42, Herbert Gasiorowski <gasi3@xxxxxx> 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@xxxxxxxxxx> DoD#743
http://www.cskk.ezoshosting.com/cs/

Sometimes you just need to look reality in the eye, and deny it.
        - Garrison Keillor

-- 
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux