Fix useless call to `cat`

This commit is contained in:
Jeremy Gardais 2020-06-09 11:47:26 +02:00
parent 2db4453a76
commit b4ac01caf7
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 2 deletions

View File

@ -169,10 +169,10 @@ get_status()
queueTriggered=false; queueTriggered=false;
# Queueset=$(${QHOST} -h ${MACHINEDOTS} -q | tail +5 | awk '{ print $1 }') # Queueset=$(${QHOST} -h ${MACHINEDOTS} -q | tail +5 | awk '{ print $1 }')
${QHOST} -h ${MACHINEDOTS} -q | tail +5 > "${PLUGIN_RESULT}.QSTATE" ${QHOST} -h ${MACHINEDOTS} -q | tail +5 > "${PLUGIN_RESULT}.QSTATE"
Queueset=$(cat "${PLUGIN_RESULT}.QSTATE" | awk '{ print $1 }') Queueset=$(< "${PLUGIN_RESULT}.QSTATE" awk '{ print $1 }')
for Qset in $Queueset; do for Qset in $Queueset; do
# qstate=$(${QHOST} -q -h ${MACHINEDOTS} | tail +5 | grep " $Qset" | awk '{print $4}') # qstate=$(${QHOST} -q -h ${MACHINEDOTS} | tail +5 | grep " $Qset" | awk '{print $4}')
qstate=$(cat "${PLUGIN_RESULT}.QSTATE" | grep " $Qset" | awk '{print $4}') qstate=$(grep " $Qset" "${PLUGIN_RESULT}.QSTATE" | awk '{print $4}')
# Order determines more significant color status # Order determines more significant color status
if [ "$(echo "${qstate}" | grep -c d)" != "0" ]; then if [ "$(echo "${qstate}" | grep -c d)" != "0" ]; then