Fix useless call to `cat`
This commit is contained in:
parent
2db4453a76
commit
b4ac01caf7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue