Given two aliases:

$ alias OPEN='{' CLOSE='};'

This works fine:

$ { OPEN echo hi; CLOSE }
hi

And this:

$ var=`{ OPEN echo hi; CLOSE }` && echo "$var"
hi

But this does not:

$ var=$({ OPEN echo hi; CLOSE }) && echo "$var"
mksh: syntax error: ')' unexpected

It works on every other shell, even pdksh.

Thanks,

- M.

Reply via email to