[PATCH 1/9] Replace pipes with a binary for cpu core count
From: Bhaskar Chowdhury
Date: Fri Jun 20 2025 - 19:02:12 EST
Change the piped series with nproc binary,hopefully for better readability
Signed-off-by: Bhaskar Chowdhury <unixbhaskar@xxxxxxxxx>
---
smatch_scripts/build_generic_data.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/smatch_scripts/build_generic_data.sh b/smatch_scripts/build_generic_data.sh
index b18ceff8320c..c88ad3fcfc0f 100755
--- a/smatch_scripts/build_generic_data.sh
+++ b/smatch_scripts/build_generic_data.sh
@@ -3,7 +3,7 @@
# This is a generic script to parse --info output. For the kernel, don't use
# this script, use build_kernel_data.sh instead.
-NR_CPU=$(cat /proc/cpuinfo | grep ^processor | wc -l)
+NR_CPU=$(nproc)
SCRIPT_DIR=$(dirname $0)
DATA_DIR=smatch_data
PROJECT=smatch_generic
--
2.46.3