This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 编写一个Shell脚本,接受一个数字作为参数,并判断该数字是奇数还是偶数。
if [ $# -ne 1 ]; then
echo "参数个数不正确"
exit 1
else
if (( $1%2==0)); then
echo "$1 是偶数"
echo "$1 是奇数"
fi