invocation-option

--posix

Start Bash in POSIX mode, not a syntax checker for portable sh.

Formal Syntax & Structure

bash syntaxbash
bash --posix -c command

Return Value

exit status

Start Bash in POSIX mode, not a syntax checker for portable sh.

Working Example

Example Snippetbash
bash --posix -c 'items=("daily report" backup); printf "%s\n" "${items[0]}"'
Bash Reference