From 1a880a38f6df93e6832eb5f29136140a9fcc8bfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Sommer?= Date: Wed, 28 Jun 2023 18:00:05 +0200 Subject: [PATCH] rt-tests: Minor code improvements --- rt-tests/rt-tests.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rt-tests/rt-tests.sh b/rt-tests/rt-tests.sh index 9aabce8..cde7765 100755 --- a/rt-tests/rt-tests.sh +++ b/rt-tests/rt-tests.sh @@ -16,8 +16,7 @@ grep -v -e "^#" -e "^$" output | tr " " "\t" >histogram cores=$(grep -c ^processor /proc/cpuinfo) for i in `seq 1 $cores` do - column=`expr $i + 1` - cut -f1,$column histogram >histogram$i + cut -f1,$(( $i + 1 )) histogram >histogram$i done # Create plot command header @@ -38,7 +37,7 @@ do then echo -n ", " >>plotcmd fi - cpuno=`expr $i - 1` + cpuno=$(( $i - 1 )) if test $cpuno -lt 10 then title=" CPU$cpuno"