From c8b6706bc54a308621ea6d44e6992f988efe56c8 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Sat, 15 Mar 2014 04:28:02 +0000 Subject: [PATCH] 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. --- inxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inxi b/inxi index b59b0f3..8bf5e5f 100755 --- a/inxi +++ b/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} "