From ad1e0a2d35aff35ae2473fe8cec0484deb9b6944 Mon Sep 17 00:00:00 2001 From: "Hahn Axel (hahn)" <axel.hahn@unibe.ch> Date: Fri, 3 Nov 2023 14:27:53 +0100 Subject: [PATCH] small enhancement in ph.toUnit --- inc_pluginfunctions | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc_pluginfunctions b/inc_pluginfunctions index d21ca19..3f64983 100644 --- a/inc_pluginfunctions +++ b/inc_pluginfunctions @@ -330,7 +330,7 @@ function ph.toUnit(){ test $_digits -gt 0 && _dots=$( yes "." 2>/dev/null | head -$_digits | tr -d "\n" ) test $_digits -gt 0 && _bc+=" -l | grep -o '.*\\.${_dots}'" - echo "$(echo "$_value" | tr -d "[:alpha:]" )*${_multiply}/$_divisor" | eval "$_bc" | sed "s#^\.#0.#" + echo "$(echo "$_value" | tr -d "[:alpha:]" )*( ${_multiply}/$_divisor )" | eval "$_bc" | sed "s#^\.#0.#" } -- GitLab