Try this Bash syntax instead of trying to use an external program expr
:
count=$((FIRSTV-SECONDV))
BTW, the correct syntax of using expr
is:
count=$(expr $FIRSTV - $SECONDV)
But keep in mind using expr
is going to be slower than the internal Bash syntax I provided above.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…