My Tech Notes
Bash: check if number is odd or even
n=12 if [[ $((n % 2)) -eq 0 ]]; then echo "even" else echo "odd" fi
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment