mirror of
https://github.com/ovh/debian-cis.git
synced 2024-12-22 14:05:23 +01:00
Fix div function to manage 0 on numerator (#79)
fix #77 Co-authored-by: GoldenKiwi <thibault.dewailly@corp.ovh.com>
This commit is contained in:
parent
c50f200c5c
commit
1c1393c7e3
@ -121,6 +121,10 @@ div() {
|
||||
local _d=${3:-2}
|
||||
local _n=0000000000
|
||||
_n=${_n:0:$_d}
|
||||
if (($1 == 0)); then
|
||||
echo "0"
|
||||
return
|
||||
fi
|
||||
if (($2 == 0)); then
|
||||
echo "N.A"
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user