Fix Use $(...) notation instead of legacy backticked
https://github.com/koalaman/shellcheck/wiki/SC2006
This commit is contained in:
parent
393f9996d2
commit
19afed7c2e
|
@ -13,7 +13,7 @@ while read LINE
|
|||
do
|
||||
DISK=$(echo "${LINE}" | cut -d" " -f1)
|
||||
TYPE=$(echo "${LINE}" | cut -d" " -f3)
|
||||
DRES=`/usr/sbin/smartctl -H -d "${TYPE}" -n standby "${DISK}"`
|
||||
DRES=$(/usr/sbin/smartctl -H -d "${TYPE}" -n standby "${DISK}")
|
||||
DCODE=$?
|
||||
DSTBY=$(( $DCODE & 2 ))
|
||||
DFAIL=$(( $DCODE & 8 ))
|
||||
|
@ -42,15 +42,15 @@ do
|
|||
echo "" >>/tmp/dres
|
||||
done < /tmp/dscan >/tmp/dcheck
|
||||
|
||||
COLOR=`cat /tmp/dcheck | awk '{print $1}' | sort | uniq | head -1 | cut -c3-`
|
||||
COLOR=$(cat /tmp/dcheck | awk '{print $1}' | sort | uniq | head -1 | cut -c3-)
|
||||
|
||||
$XYMON $XYMSRV "status ${MACHINE}.smart ${COLOR} SMART health check
|
||||
|
||||
`cat /tmp/dcheck | cut -c2-`
|
||||
$(cat /tmp/dcheck | cut -c2-)
|
||||
|
||||
==================== Detailed status ====================
|
||||
|
||||
`cat /tmp/dres`
|
||||
$(cat /tmp/dres)
|
||||
"
|
||||
|
||||
rm -f /tmp/dres /tmp/dcheck /tmp/dscan
|
||||
|
|
Loading…
Reference in New Issue