bashism

A bash-only feature, such as [[ ]], arrays, (( )) or process substitution, used in a script that claims to be POSIX sh.

In more detail

It works when /bin/sh happens to be bash, as on macOS, and fails under dash or ash on Debian, Ubuntu and Alpine. Either change the shebang to bash or rewrite the feature in POSIX form, and check with ShellCheck or by running the script under dash.

Related terms

Taught in

References