3 ms·
Scaled up: case "$1" in *0|*2|*4|*6|*8) echo even;; *) echo odd;; esac If $1 had a trailing non-digit, or was empty, that would indeed be an odd s
by teo_zero 10mo ago
Scaled up:
case "$1" in
*0|*2|*4|*6|*8) echo even;;
*) echo odd;;
esac
If $1 had a trailing non-digit, or was empty, that would indeed be an odd situation!