Archive

All articles

51 articles, page 6 of 6

Bash

is_num() in Bash: Check if a Value Is a Number

Check that input is a whole number, a signed integer or a decimal before doing arithmetic, and avoid the octal, empty-string and injection problems in (( )).

6 min read, updated 17 Oct 2026