Fix individual redirection with { cmd1; cmd2; }
Consider using { cmd1; cmd2; } >> file instead of individual redirects. See : https://github.com/koalaman/shellcheck/wiki/SC2129
This commit is contained in:
parent
b05d10771c
commit
b589528e03
|
@ -127,12 +127,14 @@ while IFS= read -r LINE; do
|
||||||
|
|
||||||
echo "${COLOR} $DISK ${TYPE}"
|
echo "${COLOR} $DISK ${TYPE}"
|
||||||
|
|
||||||
echo "${COLOR} $DISK ${TYPE}" | cut -c2- >>/tmp/dres
|
{
|
||||||
echo "" >>/tmp/dres
|
echo "${COLOR} $DISK ${TYPE}" | cut -c2-
|
||||||
echo "$DRES" | grep -v -E "^smartctl|^Copyright|^$|^===" >>/tmp/dres
|
echo ""
|
||||||
echo "------------------------------------------------------------" >>/tmp/dres
|
echo "$DRES" | grep -v -E "^smartctl|^Copyright|^$|^==="
|
||||||
echo "" >>/tmp/dres
|
echo "------------------------------------------------------------"
|
||||||
echo "" >>/tmp/dres
|
echo ""
|
||||||
|
echo ""
|
||||||
|
} >>/tmp/dres
|
||||||
done < /tmp/dscan >/tmp/dcheck
|
done < /tmp/dscan >/tmp/dcheck
|
||||||
|
|
||||||
# Set the global color according to the highest alert
|
# Set the global color according to the highest alert
|
||||||
|
|
Loading…
Reference in New Issue