From bfcc6035eb72c1ebbc6474267b0b91d835716bb4 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 8 Nov 2008 06:27:48 +0000 Subject: [PATCH] trying hard disk size output with decimal place, one, for smaller usb drives --- inxi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index 4aec341..a4bde2a 100755 --- a/inxi +++ b/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}