Fix useless use of cat
https://github.com/koalaman/shellcheck/wiki/SC2002 https://en.wikipedia.org/wiki/Cat_(Unix)#Useless_use_of_cat See also : https://github.com/koalaman/shellcheck/wiki/SC2189
This commit is contained in:
parent
a210b7bb38
commit
fcf945748b
|
@ -42,11 +42,11 @@ do
|
||||||
echo "" >>/tmp/dres
|
echo "" >>/tmp/dres
|
||||||
done < /tmp/dscan >/tmp/dcheck
|
done < /tmp/dscan >/tmp/dcheck
|
||||||
|
|
||||||
COLOR=$(cat /tmp/dcheck | awk '{print $1}' | sort | uniq | head -1 | cut -c3-)
|
COLOR=$(< /tmp/dcheck awk '{print $1}' | sort | uniq | head -1 | cut -c3-)
|
||||||
|
|
||||||
$XYMON $XYMSRV "status ${MACHINE}.smart ${COLOR} SMART health check
|
$XYMON $XYMSRV "status ${MACHINE}.smart ${COLOR} SMART health check
|
||||||
|
|
||||||
$(cat /tmp/dcheck | cut -c2-)
|
$(< /tmp/dcheck cut -c2-)
|
||||||
|
|
||||||
==================== Detailed status ====================
|
==================== Detailed status ====================
|
||||||
|
|
||||||
|
@ -56,4 +56,3 @@ $(cat /tmp/dres)
|
||||||
rm -f /tmp/dres /tmp/dcheck /tmp/dscan
|
rm -f /tmp/dres /tmp/dcheck /tmp/dscan
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue