From f1ffdc3a74a050b8caebca82d764624b33b7e6f9 Mon Sep 17 00:00:00 2001 From: Shawn Presser Date: Fri, 27 Jan 2023 16:33:01 -0600 Subject: [PATCH] math: allow setting scale=10 env var --- math | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/math b/math index 4e92f79..19549d7 100755 --- a/math +++ b/math @@ -1,4 +1,4 @@ #!/bin/sh -scale=4 # results will print to the 4th decimal +scale=${scale:-4} # results will print to the 4th decimal echo "scale=$scale; $@" | bc -l