File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ flush='tput ed'
5555# Bash does not handle floats
5656# This section defines some math functions using awk
5757# ==================================================
58-
58+ export LC_ALL=C
5959
6060math::floor () {
6161 # -- This function takes a pseudo-floating point as argument
@@ -71,12 +71,12 @@ math::round() {
7171
7272math::min () {
7373 # -- Takes two values as arguments and compare them
74- awk -v f1=" $1 " -v f2=" $2 " ' BEGIN{if (f1<=f2) min=f1; else min=f2; printf min "\n"}'
74+ awk -v f1=" $1 " -v f2=" $2 " ' BEGIN{if (f1<=f2) min=f1; else min=f2; print min "\n"}'
7575}
7676
7777math::max () {
7878 # -- Takes two values as arguments and compare them
79- awk -v f1=" $1 " -v f2=" $2 " ' BEGIN{if (f1>f2) max=f1; else max=f2; printf max "\n"}'
79+ awk -v f1=" $1 " -v f2=" $2 " ' BEGIN{if (f1>f2) max=f1; else max=f2; print max "\n"}'
8080}
8181
8282math::calc () {
You can’t perform that action at this time.
0 commit comments