A command substitution is replaced by the output generated by the speci-
fied command, which is run in a subshell. For $(command) substitutions,
normal quoting rules are used when command is parsed; however, for the
`command` form, a `\' followed by any of `$', ``', or `\' is stripped (a
`\' followed by any other character is unchanged). As a special case in
command substitutions, a command of the form <file is interpreted to mean
substitute the contents of file. Note that $(< foo) has the same effect
as $(cat foo), but it is carried out more efficiently because no process
is started.
Note: $(command) expressions are currently parsed by finding the matching
parenthesis, regardless of quoting. This should be fixed soon.
если вкратце: первое можно только на баше, на sh нельзя. Зато второе не поддерживает вложенность, в то время, как в первом можно $(pkg-config --cflags $(find gtk| sed somth))