#队列深度
ZBID=brcb.Queue.Depth
MQ_List=$(dspmq | awk -F'(' '{print $2}'| awk -F')' '{print $1}')
for i in $(echo $MQ_List)
do
skip_first=true
output=$(su - mqm -c 'echo "DISPLAY QLOCAL(*) CURDEPTH" | runmqsc $i | tail -n +6 |head -n -3')
IFS_OLD=$IFS
IFS='\:'
for line in $output
do
if [ "$skip_first" = true ]; then
skip_first=false
else
TD_Name=$(echo $line|grep -o 'QUEUE([^)]*)' | cut -d "(" -f2 | cut -d ")" -f1)
TD_Depth=$(echo $line|grep -o 'CURDEPTH([^)]*)' | cut -d "(" -f2 | cut -d ")" -f1)
echo "${TD_Depth}|$TD_Name"
fi
done
IFS=$IFS_OLD
done