From e87d4ef3b92962e16b3361ebd6124eb1135fa4b8 Mon Sep 17 00:00:00 2001 From: Htylol Date: Wed, 9 Jul 2025 02:43:32 +0500 Subject: [PATCH] Correct display of logical_cores when the number of cores is less than 4 --- data_from_portwine/scripts/functions_helper | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data_from_portwine/scripts/functions_helper b/data_from_portwine/scripts/functions_helper index 76eba63c..f56aabb2 100755 --- a/data_from_portwine/scripts/functions_helper +++ b/data_from_portwine/scripts/functions_helper @@ -2870,8 +2870,8 @@ pw_skip_get_info () { fi logical_cores=$(grep -c ^"processor" /proc/cpuinfo) - if [[ "${logical_cores}" -le "4" ]] ; then - GET_LOGICAL_CORE="1!$(seq -s! 1 $(( logical_cores - 1 )))" + if (( $logical_cores <= "4" )) ; then + GET_LOGICAL_CORE="$(seq -s! 1 $(( logical_cores - 1 )))" else GET_LOGICAL_CORE="1!2!$(seq -s! 4 4 $(( logical_cores - 1 )))" fi