Skip to content
Joachim Ansorg edited this page Nov 12, 2021 · 2 revisions

(( )) doesn't support decimals. Use bc or awk.

Bash arithmetic conditional evaluation can only be performed on integers. More detail: Bash has limited data types which include integer, but everything is effectively untyped.

Suggested workarounds to this constraint use bc or awk, here are some examples.

ShellCheck

Each individual ShellCheck warning has its own wiki page like S001. Use GitHub "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally