mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 18:12:21 +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
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.4.4
|
#### version: 0.4.5
|
||||||
#### Date: November 7 2008
|
#### Date: November 7 2008
|
||||||
########################################################################
|
########################################################################
|
||||||
#### inxi is a fork of infobash, the original bash sys info script by locsmif
|
#### 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
|
# note: pmap handles usb mounted devices, which have a null first field
|
||||||
a_temp_scsi=( $( gawk -F'\t' '
|
a_temp_scsi=( $( gawk -F'\t' '
|
||||||
BEGIN { IGNORECASE=1 }
|
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) )
|
||||||
gsub(/^ +| +$/, "", $(NF -1) )
|
gsub(/^ +| +$/, "", $(NF -1) )
|
||||||
print $(NF -1)
|
print $(NF -1)
|
||||||
|
|
Loading…
Reference in a new issue