dash is supposed to be POSIX-compliant but it still seems that it does not have all of the features that bash has, the $( ) construct is an example. You need to use backticks
Example:
PS: I don't use dash, but you should be aware of the gotchas if you choose to keep using it. dash is not meant as a one-to-one replacement for bash.
This User Gave Thanks to jim mcnamara For This Post:
dash is supposed to be POSIX-compliant but it still seems that it does not have all of the features that bash has, the $( ) construct is an example. You need to use backticks
According to its documentation, dash does support the modern, POSIX-compliant $(...) command substitution syntax.
I don't use dash either, but I suspect the problem lies with the parentheses surrounding the command substitution, which look like a bash list/array assignment.