diff --git a/SC2079.md b/SC2079.md new file mode 100644 index 0000000..19d880e --- /dev/null +++ b/SC2079.md @@ -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). \ No newline at end of file