mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Empty page, so here's my contributed research.
6
SC2079.md
Normal file
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).
|
Reference in New Issue
Block a user