How should I change this to check whether val has an even or odd numeric value?
val
val=2 if $((RANDOM % $val)); ...
$ a=4 $ [ $((a%2)) -eq 0 ] && echo "even" even $ a=3 $ [ $((a%2)) -eq 0 ] && echo "even"
2.1m questions
2.1m answers
60 comments
57.0k users