Merge pull request #4 from 0DUDDU/develop
Fix: handle spaces in Filesystem name
This commit is contained in:
commit
eb48df0f85
1 changed files with 2 additions and 2 deletions
4
agent.sh
4
agent.sh
|
@ -130,8 +130,8 @@ swap_usage=$((($swap_total-$swap_free) * 1024))
|
|||
swap_total=$(($swap_total * 1024))
|
||||
|
||||
# Disk usage (in bytes)
|
||||
disk_total=$(prep $(num "$(($(df -P -B 1 | grep '^/' | awk '{ print $2 }' | sed -e :a -e '$!N;s/\n/+/;ta')))"))
|
||||
disk_usage=$(prep $(num "$(($(df -P -B 1 | grep '^/' | awk '{ print $3 }' | sed -e :a -e '$!N;s/\n/+/;ta')))"))
|
||||
disk_total=$(prep $(num "$(($(df --output=size,source -B 1 | grep ' /' | awk '{ print $1 }' | sed -e :a -e '$!N;s/\n/+/;ta')))"))
|
||||
disk_usage=$(prep $(num "$(($(df --output=used,source -B 1 | grep ' /' | awk '{ print $1 }' | sed -e :a -e '$!N;s/\n/+/;ta')))"))
|
||||
|
||||
# Disk array
|
||||
disk_array=$(prep "$(df -P -B 1 | grep '^/' | awk '{ print $1" "$2" "$3";" }' | sed -e :a -e '$!N;s/\n/ /;ta' | awk '{ print $0 } END { if (!NR) print "N/A" }')")
|
||||
|
|
Loading…
Reference in a new issue