Is command substitution $(foo) bashism?

Viewed 3313

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).

2 Answers
Related