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:
inxi-svn 2014-03-15 04:28:02 +00:00
parent 94359c91c1
commit c8b6706bc5

2
inxi
View file

@ -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} "