Skip to content

Commit dcbf459

Browse files
committed
Avoid dependency on bc for a multiplication
1 parent 1cd002b commit dcbf459

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Utilities/Tools/jobutils2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ getNumberOfPhysicalCPUCores() {
398398
CORESPERSOCKET=`lscpu | grep "Core(s) per socket" | awk '{print $4}'`
399399
SOCKETS=`lscpu | grep "Socket(s)" | awk '{print $2}'`
400400
fi
401-
N=`bc <<< "${CORESPERSOCKET}*${SOCKETS}"`
401+
N=$((${CORESPERSOCKET}*${SOCKETS}))
402402
echo "${N}"
403403
}
404404

0 commit comments

Comments
 (0)