mirror of
https://github.com/smxi/inxi.git
synced 2025-01-19 08:57:57 +00:00
improved extra whitespace handling in cpu model filters, now all > 1 whitespace becomes a single ' '
This commit is contained in:
parent
90779b6369
commit
c21dfba13d
5
inxi
5
inxi
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
########################################################################
|
########################################################################
|
||||||
#### Script Name: inxi
|
#### Script Name: inxi
|
||||||
#### version: 0.3.22
|
#### version: 0.3.23
|
||||||
#### Date: November 5 2008
|
#### Date: November 5 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
|
||||||
|
@ -810,9 +810,9 @@ get_cpu_data()
|
||||||
|
|
||||||
/^model name|^cpu\t+:/ {
|
/^model name|^cpu\t+:/ {
|
||||||
gsub(/,/," ",$NF)
|
gsub(/,/," ",$NF)
|
||||||
gsub(//,"",$NF)
|
|
||||||
gsub(/'"$A_NORMAL_BANS"'/, "", $NF )
|
gsub(/'"$A_NORMAL_BANS"'/, "", $NF )
|
||||||
gsub(/'"$A_CPU_BANS"'/, "", $NF )
|
gsub(/'"$A_CPU_BANS"'/, "", $NF )
|
||||||
|
gsub(/[ \t]+/," ",$NF)
|
||||||
cpu[nr, "model"] = $NF
|
cpu[nr, "model"] = $NF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1270,6 +1270,7 @@ calculate_multicore_data()
|
||||||
echo "$string_number$string_data"
|
echo "$string_number$string_data"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# prints out shortened list of flags, the main ones of interest
|
||||||
# args: $1 - string of cpu flags to process
|
# args: $1 - string of cpu flags to process
|
||||||
process_cpu_flags()
|
process_cpu_flags()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue