Eu tenho um script, mas a saída dele tem um erro:
...
while read output; of
#echo $ output
used = $ (echo $ output | awk '{print $ 1} | cut -d'% '-f1)
partition = $ (echo $ output | awk '{print $ 2}')
if [$ used -ge $ Alert]; then
Status = $ ((True))
The partition <b> $ partition </ b> is using $ used% at $ (date). </ Pre> \ n ")
fi
#echo $ Status
done <<< (df -H | grep -vE "^ Filesystem | tmpfs | cdrom" | awk '{print $ 5 "" $ 6}')**
./checkspace.sh: 21: ./checkspace.sh: Syntax error: redirection unexpected
A linha 21 é esta:
done <<< (df -H | grep -vE "^ Filesystem | tmpfs | cdrom" | awk '{print $ 5 "" $ 6})
Tags shell-script