Orignally posted at my personal site, Jeep Monkey, I thought it appropiate to copy over here.


Recently when setting up some Reporting to be controlled by ControlM/EM I experienced an issue using the IBM supplied trigger.sh script. It worked perfectly well when using a single word Namespace, but once we tried against a two word Namespace it failed.

All documentation that I found on the web and in the supplied manuals indicated that a two word Name space should work by just putting it in quotes. Nup, No Way, FAIL! This might work OK under a Windows environment but not AIX.

The problem is that the IBM Supplied script does not handle spaces in positional parameters, the line towards the bottom of the script is coded as;

${JAVA_HOME}/bin/java -classpath ${CLASSPATH} Trigger ${1} ${2} ${3} ${4}  ${5}

So it thinks it is getting 6 arguments instead of 5 when handling the Namespace of “Novell eDirectory” and instantly fails as it only expecting 5.

A quick and simple change to make it work was to change it to;

${JAVA_HOME}/bin/java -classpath ${CLASSPATH} Trigger "$@"

This retains the space when parsing the parameters. Sweet! All Good!.