What is the most elegant way to make this work?
prc_count=$(nproc --all)
factor=0.5
prc_count=$((prc_count*factor))
I tried with awk/echo and no success
What is the most elegant way to make this work?
prc_count=$(nproc --all)
factor=0.5
prc_count=$((prc_count*factor))
I tried with awk/echo and no success
0.5
, you could do$(( a * 5 / 10 ))
. Also, if you're going to say "I tried xyz and no success", it's better to show what exactly you tried and what exactly the problem was, it makes it easier to help you. – ilkkachu Jun 08 '22 at 12:20