variable
POSIXLY_CORRECT
Setting this variable in Bash enables POSIX mode; other utilities may interpret it independently.
Formal Syntax & Structure
bash syntaxbash
POSIXLY_CORRECT=1Return Value
exit status
Setting this variable in Bash enables POSIX mode; other utilities may interpret it independently.
Working Example
Example Snippetbash
POSIXLY_CORRECT=1if [[ -o posix ]]; then printf 'enabled\n'; fi