Fixed disksize module

This commit is contained in:
Manuel Palenzuela 2019-10-22 19:19:33 +01:00
parent f5a2b06081
commit b09384fac8

View file

@ -6,9 +6,9 @@ PREFIX=' '
get_disk() get_disk()
{ {
TOTAL_SIZE=$( df -h --total / | tail -1 | awk {'printf $2'}) TOTAL_SIZE=$( df -h --total | tail -1 | awk {'printf $2'})
USED_SIZE=$(df -h --total / | tail -1 | awk {'printf $3'}) USED_SIZE=$(df -h --total | tail -1 | awk {'printf $3'})
PERCENTAGE=$(df -h --total / | tail -1 | awk {'printf $5'}) PERCENTAGE=$(df -h --total | tail -1 | awk {'printf $5'})
echo "$PREFIX$USED_SIZE/$TOTAL_SIZE ($PERCENTAGE)" echo "$PREFIX$USED_SIZE/$TOTAL_SIZE ($PERCENTAGE)"
} }