pmp-check-mysql-status -l $USER3$ -p $USER4$ ......

Unfortunately, there are no errors in the output like you posted initially:
awk: line 8: syntax error at or near )
awk: line 13: syntax error at or near if
awk: line 24: syntax error at or near exit

Please re-run the similar sh -x command for debugging purpose once you get the errors with awk to track it down.