diff --git a/inxi b/inxi index c6152bc..bd29987 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.0.4-b1-t3 +#### version: 1.0.4-b1-t4 #### Date: 1 March 2009 ######################################################################## #### SPECIAL THANKS @@ -2408,12 +2408,16 @@ get_partition_data() # though this can include /dev/ramzswap0. Note: you can also use /proc/swaps for this # data, it's the same exact output as swapon -s $( swapon -s | gawk ' + BEGIN { + swapCounter = 1 + } /^\/dev/ { size = sprintf( "%.2f", $3*1024/1000**3 ) devBase = gensub( /^(\/dev\/)(.+)$/, "\\2", 1, $1 ) used = sprintf( "%.2f", $4*1024/1000**3 ) percentUsed = sprintf( "%.0f", ( $4/$3 )*100 ) - print "swap," size "GB," used "GB," percentUsed "\%,main," devBase + print "swap-" swapCounter "," size "GB," used "GB," percentUsed "\%,main," devBase + swapCounter = ++swapCounter }' ) ) IFS="$ORIGINAL_IFS"