Commit 34f145b7 authored by Andrew Titmuss's avatar Andrew Titmuss

made the if statements shorter

parent 3cb804f9
...@@ -1508,14 +1508,12 @@ getdisk () { ...@@ -1508,14 +1508,12 @@ getdisk () {
disk_total=${disk_total/G} disk_total=${disk_total/G}
if [[ "$disk_used" == *"T" ]]; then if [[ "$disk_used" == *"T" ]]; then
disk_used=${disk_used/T} disk_used=$(echo "${disk_used/T} * 1000" | bc)
disk_used=$(echo "${disk_used} * 1000" | bc)
disk_used=${disk_used/'.'*} disk_used=${disk_used/'.'*}
fi fi
if [[ "$disk_total" == *"T" ]]; then if [[ "$disk_total" == *"T" ]]; then
disk_total=${disk_total/T} disk_total=$(echo "${disk_total/T} * 1000" | bc)
disk_total=$(echo "${disk_total} * 1000" | bc)
disk_total=${disk_total/'.'*} disk_total=${disk_total/'.'*}
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment