Empty page, so here's my contributed research.

Mark Lavi
2018-10-13 23:31:48 -05:00
parent d5bfa83e47
commit 4db5da923a

6
SC2079.md Normal file

@@ -0,0 +1,6 @@
# (( )) doesn't support decimals. Use bc or awk.
Bash [arithmetic conditional evaluation can only be performed on integers](https://www.tldp.org/LDP/abs/html/comparison-ops.html). More detail: Bash has limited data types which [include integer](http://www.tldp.org/LDP/abs/html/declareref.html), but everything is effectively [untyped](http://www.tldp.org/LDP/abs/html/untyped.html).
Suggested workarounds to this constraint use bc or awk, here are
[some examples](https://stackoverflow.com/questions/11237794/how-to-compare-two-decimal-numbers-in-bash-awk).