I am running a script in which I want to detect the WebSphere MQ Version and if this version is 7.1, then I want to run a runmqsc
to set channel authentication. I do this:
<if>
<or>
<os name ="AIX">
<os name ="Linux">
</or>
<then>
<loginfo>Checking the installed MQ version.</loginfo>
<osexec commandbase="su" dir="/bin" mode="osexec">
<args>
<arg value="-"/>
<arg value="- ${mq_admin_name}"/>
<arg value="-c"/>
<arg line="dspmqver | grep Version"/>
</args>
</osexec>
<if>
<not>
<not>
<contains casesensitive="yes" substring="7.1.0.0" string="${result.output}"/>
</not>
</not>
<then>
...........
..........
After this I use a runmqsc
.
But the problem is the string {result.output}
is empty. The dspmqver
command is not getting executed properly..can someone suggest why?