Re: [slightly OT] writing "POSIX-compatible" scripts, and script analysis tools?

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

 



On Thu, Jul 20, 2017 at 6:01 PM, Cameron Simpson <cs@xxxxxxxxxx> wrote:
> On 20Jul2017 13:41, Joe Zeff <joe@xxxxxxx> wrote:
>> On 07/20/2017 05:31 AM, George N. White III wrote:
>>>
>>> Rigid adherence to a standard is often overkill. Bashisms have been
>>> a practical problem for systems that use dash for /bin/sh.
>>
>> My understanding is that when bash is invoked as sh, it acts exactly
>> as sh itself would, so that only those builtin commands that are in
>> sh are available. Judging by what you write, this seems not to be the
>> case any more.
>
> My recollection was that bash went POSIXly when invoked as /bin/sh,
> _with some small exceptions_. I think it's been only-mostly-correct
> for a long time; it was a long time ago when I read the caveat.
>
> I've never checked thoroughly, but I imagine it has to do with parser
> issues and low level things like that. For example, a longstanding
> pain point for me is that bash requires function names to the
> identifiers rather than just words. In a script my function names are
> identifiers, but interactively I've got a bunch of nonidentifier
> preferably-functions which are special cased as aliases or the like in
> bash. (I invoke my mail reader as "+", for example.)

https://www.gnu.org/software/bash/manual/html_node/Bash-POSIX-Mode.html
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux