mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
better debugging output
This commit is contained in:
parent
56df25f401
commit
5904c7604a
11
inxi
11
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.9.3-b1-t3
|
#### version: 0.9.3-b1-t4
|
||||||
#### Date: January 8, 2009
|
#### Date: January 8, 2009
|
||||||
########################################################################
|
########################################################################
|
||||||
#### SPECIAL THANKS
|
#### SPECIAL THANKS
|
||||||
|
@ -1881,17 +1881,24 @@ get_hdd_data_basic()
|
||||||
getline
|
getline
|
||||||
}
|
}
|
||||||
if ( $4 ~ /.*\%/ ) {
|
if ( $4 ~ /.*\%/ ) {
|
||||||
|
print "b: " $1 "used: " $2 "full: " $1
|
||||||
used += $2
|
used += $2
|
||||||
|
full += $1
|
||||||
}
|
}
|
||||||
else if ( $5 ~ /.*\%/ ) {
|
else if ( $5 ~ /.*\%/ ) {
|
||||||
|
print "a: " $1 "used: " $3 "full: " $2
|
||||||
used += $3
|
used += $3
|
||||||
|
full += $2
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
next
|
next
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
END {
|
END {
|
||||||
print used
|
print "used : " used
|
||||||
|
print "full : " full
|
||||||
|
percent = used/full
|
||||||
|
print "percent : " percent
|
||||||
}' )
|
}' )
|
||||||
else
|
else
|
||||||
hdd_used=$( df | gawk '
|
hdd_used=$( df | gawk '
|
||||||
|
|
Loading…
Reference in a new issue