I've been trying to compile some ocaml packages and keep running into some errors of the form
sh: 1: Bad substitution (exit code 2), eg.
/bin/sh -exc echo | m4 /bin/sh: 1: Bad substitution
/bin/sh -ec echo | m4 has no error. It seems that any command with both
-x flags passed to
/bin/sh (/bin/sh: symbolic link to dash) results in this error. Is this the expected behaviour, because I can't see anything to that effect in the manual, and I can't remember ever having this happen before.
EDIT: actually I see the error with any
/bin/sh -xc command, regardless of