mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
Trying a different way to handle flash drives, check for space starting first field
This commit is contained in:
parent
d324cb287d
commit
78c1b52da1
5
inxi
5
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)
|
||||
|
|
Loading…
Reference in a new issue