mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
changed to use bash variable stuff instead of subshell, no functional change,
but the bash variable manipulation seems to be a bit, quite a bit in some cases, more efficient than subshells, so I'll remove as many subshells as makes sense over time. Only dumping the wc -c subshells from the help print loops increased speed of that by about 300% or so, literally.
This commit is contained in:
parent
94359c91c1
commit
c8b6706bc5
2
inxi
2
inxi
|
@ -11036,7 +11036,7 @@ print_sensors_data()
|
|||
gpu_temp=$( get_gpu_temp_data )
|
||||
# dump the unneeded screen data for single gpu systems
|
||||
if [[ $( wc -w <<< $gpu_temp ) -eq 1 && $B_EXTRA_DATA != 'true' ]];then
|
||||
gpu_temp=$( cut -d ':' -f 2 <<< $gpu_temp )
|
||||
gpu_temp=${gpu_temp#*:}
|
||||
fi
|
||||
if [[ -n $gpu_temp ]];then
|
||||
gpu_temp="${C1}gpu$SEP3${C2} ${gpu_temp} "
|
||||
|
|
Loading…
Reference in a new issue