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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux