What are Bash POSIX extensions?

General support questions
Post Reply
bodisha
Posts: 32
Joined: 2015/06/06 23:55:29

What are Bash POSIX extensions?

Post by bodisha » 2018/01/13 18:40:04

Hello.. and thanks in advance for any help anyone can offer me to figure this out

I'm reading about the about the Bash shell... and I've read from many sources that to make Bash POSIX compliant it needs "extensions"... Which sounds to me like something I should be able to load into Bash to do this... I've tried googling the subject but can't seem to find any detail about this subject... What little I can find basically says nothing more than "Bash needs extensions"

Is there a way I can view the extensions Bash is loading? Load or unload them? Configure them differently?

Once again... thanks for any help!

owl102
Posts: 304
Joined: 2014/06/10 19:13:41

Re: What are Bash POSIX extensions?

Post by owl102 » 2018/01/13 22:32:29

bodisha wrote:and I've read from many sources that to make Bash POSIX compliant it needs "extensions"
Where have you read this? I'm not aware of this. Instead bash offers extensions to the POSIX standard.

There is a "Bash POSIX Mode" causing Bash to conform more closely to the POSIX standard: https://www.gnu.org/software/bash/manua ... -Mode.html

Maybe this is what your up to?

bodisha
Posts: 32
Joined: 2015/06/06 23:55:29

Re: What are Bash POSIX extensions?

Post by bodisha » 2018/01/14 15:05:40

Thanks for the reply
Where have you read this? I'm not aware of this. Instead bash offers extensions to the POSIX standard
I might not have phrased it correctly.... But what are the extensions you're talking about? An extension sounds like something that needs to be loaded into Bash to me... After giving it some thought I started wondering if extensions were compiled into bash.... Could I ask you to elaborate one what you're calling and extension and how they're introduced into bash?

Here's a quote from one of the explanations I've read that mentioned extensions
bash started as an sh-compatible implementation (although it predates the POSIX standard by a few years), but as time passed it has acquired many extensions. Many of these extensions may change the behavior of valid POSIX shell scripts, so by itself bash is not a valid POSIX shell. Rather, it is a dialect of the POSIX shell language.

bash supports a --posix switch, which makes it more POSIX-compliant. It also tries to mimic POSIX if invoked as sh.
It came from a posting about Bash at stackoverflow.com

https://stackoverflow.com/questions/572 ... h-and-bash

Thanks

owl102
Posts: 304
Joined: 2014/06/10 19:13:41

Re: What are Bash POSIX extensions?

Post by owl102 » 2018/01/14 15:35:27

bodisha wrote:But what are the extensions you're talking about?
Everything bash offers what the POSIX standard does not define. There are a few listed in the link from my earlier post, and here are some of them listed, too:

http://mywiki.wooledge.org/Bashism

Post Reply