带有ssh的IBM runmqsc参数为空

时间:2018-10-23 18:10:19

标签: ibm-mq mq

 SERVER="192.1.1.1"
 QUEUE="QUSERV"
 CHANNEL="CHN001"
 COMMAND="display chstatus($CHANNEL) where(status eq RUNNING)"
RESULT=`ssh -n -i /home/admusr/.ssh/id_rsa -o ConnectTimeout=15 admusr@$SERVER "echo \"$COMMAND\" | /opt/mqm/bin/runmqsc $QUEUE | grep 'STATUS(RUNNING)' "`

回显$ RESULT(为空白)

Bash脚本:结果为空,因为执行脚本时$ QUEUE分配有“”。

有人有小费吗?

这是以下内容的输出:ssh -n -i /home/admusr/.ssh/id_rsa -o ConnectTimeout=15 admusr@$SERVER "echo \"$COMMAND\" /opt/mqm/bin/runmqsc $QUEUE grep 'STATUS(RUNNING)' "

以上命令的输出为:

`grep STATUS(RUNNING)lay chstatus(QMBLUE1.QMRED1) where(status eq RUNNING)` /opt/mqm/bin/runmqsc QMBLUE1

0 个答案:

没有答案