syntax error : invalid macro invocation '$'
A single dollar sign ($) appeared without a macro name associated with it.
The correct form is $(name). To specify a dollar sign, use a double dollar sign ($$) or precede the dollar sign with a caret (^).