You are using the command correctly, but debugging will be tough.
Best to echo the content of the command that isn't running, and manually paste into your terminal.
If you are using shared server space, be sure that the exec command is available for your use. Some admins don't allow it.