From 78c1b52da1dffd234ddc3d2e4513c6100c4d7367 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 8 Nov 2008 06:25:31 +0000 Subject: [PATCH] Trying a different way to handle flash drives, check for space starting first field --- inxi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inxi b/inxi index 6b3d226..4aec341 100755 --- a/inxi +++ b/inxi @@ -1,7 +1,7 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 0.4.4 +#### version: 0.4.5 #### Date: November 7 2008 ######################################################################## #### inxi is a fork of infobash, the original bash sys info script by locsmif @@ -1228,7 +1228,8 @@ get_hard_drive_data_advanced() # note: pmap handles usb mounted devices, which have a null first field a_temp_scsi=( $( gawk -F'\t' ' BEGIN { IGNORECASE=1 } - /^ata|^scsi|pmap$/ { + # if the item starts with empty, void field, assume it is flash drive + /^ata|^scsi|^ / { gsub(/,/, " ", $(NF -1) ) gsub(/^ +| +$/, "", $(NF -1) ) print $(NF -1)