trying to handle weird space in name case

This commit is contained in:
inxi-svn 2009-02-26 17:15:09 +00:00
parent 10f94c950f
commit 812417b90a

5
inxi
View file

@ -2444,6 +2444,8 @@ get_partition_data_advanced()
partition = ""
partTemp = ""
}
# trying to handle space in name
gsub( /\\040/, " ", $0 )
/[ \t]'$mount_point'[ \t]/ && $1 != "rootfs" {
# initialize the variables
label = ""
@ -2512,6 +2514,9 @@ get_partition_data_advanced()
}' )
elif [[ -n $dev_disk_label ]] && [[ -z $dev_item && -n $dev_label ]];then
dev_item=$( echo "$dev_disk_label" | gawk '
# first we need to change space x20 in by-label back to a real space
gsub( /x20/, " ", $0 )
# then we can see if the string is there
/'$dev_label'/ {
item=gensub( /..\/..\/(.+)/, "\\1", 1, $NF )
print item