Trying a different way to handle flash drives, check for space starting first field

This commit is contained in:
inxi-svn 2008-11-08 06:25:31 +00:00
parent d324cb287d
commit 78c1b52da1

5
inxi
View file

@ -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)