There are two different syntaxes for command substitution,
FOO=$(echo bar)
and
FOO=`echo bar`
As far as I know, the first method is defined in Bash, while the second is defined in sh.
Consider the following use of command substitution in an sh script.
#!/bin/sh
FOO=$(echo bar)
Does that fall under the definition of bashism?
bashisms, i.e. features not defined by
POSIX (won’t work in dash, or general
/bin/sh).
It’s the same thing. So no it’s not a bashism nor related to bash only.
Resources :