There are two different syntaxes for command substitution,
FOO=$(echo bar)
and
FOO=`echo bar`
As far as I
Actually, the $(...) command substitution syntax is defined by POSIX, though it's not part of the earlier SVID sh standard. So as long as you don't care about running on pre-POSIX systems, it should be fine.
$(
)
sh