mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
trying hard disk size output with decimal place, one, for smaller usb drives
This commit is contained in:
parent
78c1b52da1
commit
bfcc6035eb
4
inxi
4
inxi
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
#### Script Name: inxi
|
||||
#### version: 0.4.5
|
||||
#### version: 0.4.6
|
||||
#### Date: November 7 2008
|
||||
########################################################################
|
||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
||||
|
@ -1169,7 +1169,7 @@ get_hdd_data_basic()
|
|||
driveSize = $(NF - 1)*1024/1000**3
|
||||
gsub(/,/, " ", driveSize)
|
||||
gsub(/^ +| +$/, "", driveSize)
|
||||
printf( $NF",%dGB,\n", driveSize )
|
||||
printf( $NF",%.1fGB,\n", driveSize )
|
||||
}
|
||||
# See http://lanana.org/docs/device-list/devices-2.6+.txt for major numbers used below
|
||||
$1 ~ /^(3|22|33|8)$/ && $2 % 16 == 0 {size+=$3}
|
||||
|
|
Loading…
Reference in a new issue