From d2bdbe774e4f65860ce26806f1c314a9c0ed5524 Mon Sep 17 00:00:00 2001 From: Luk Lu Date: Sun, 26 Jun 2022 20:51:18 +0800 Subject: [PATCH] u --- cpu-test-by-pi.sh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 cpu-test-by-pi.sh diff --git a/cpu-test-by-pi.sh b/cpu-test-by-pi.sh new file mode 100644 index 0000000..c204801 --- /dev/null +++ b/cpu-test-by-pi.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "=== Enter Pi precision to calculate (leave blank for default to 5000): " +read -p ">>> " precision +if [ ! $precision ]; then + precision=5000 +fi + +time echo "scale=$precision; 4*a(1)" | bc -l -q