2017-11-17 17:06:52 +08:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# 打印10以内的奇数
|
|
|
|
for (( i = 0; i < 10; i ++ )); do
|
2019-10-10 08:56:31 +08:00
|
|
|
if [[ $((i % 2)) -eq 0 ]]; then
|
|
|
|
continue;
|
|
|
|
fi
|
|
|
|
echo ${i}
|
2017-11-17 17:06:52 +08:00
|
|
|
done
|
2019-03-01 10:36:45 +08:00
|
|
|
# Output:
|
|
|
|
# 1
|
|
|
|
# 3
|
|
|
|
# 5
|
|
|
|
# 7
|
|
|
|
# 9
|