This commit is contained in:
Michael Grote 2021-09-22 17:27:30 +02:00
parent c8d0b1dca7
commit 77e3975159

View file

@ -340,16 +340,16 @@ function get_disk_value {
while read -r line; do
echo $line | grep KiB | awk '/(free-hdd-space:)/ {
gsub(/KiB/,"",$2)
print free_disk.value $2 }'
print "free_disk.value" $2 }'
echo $line | grep MiB | awk '/(free-hdd-space:)/ {
gsub(/MiB/,"",$2)
print free_disk.value $2*1024}'
print "free_disk.value" $2*1024}'
echo $line | grep KiB | awk '/(total-hdd-space:)/ {
gsub(/KiB/,"",$2)
print total_disk.value $2 }'
print "total_disk.value" $2 }'
echo $line | grep MiB | awk '/(total-hdd-space:)/ {
gsub(/MiB/,"",$2)
print total_disk.value $2*1024}'
print "total_disk.value" $2*1024}'
done <<< "$data"
}