#!/bin/bash
#2024/04/29 I am ???
# 1.讓使用者輸入一個數字,將這個數字帶給 num 變數
read -p Input 0~1000: num
num=${1}
if [ "$num" == "" ]; then
fi
echo "no number"
exit 2
check=$(echo "$num" | grep -v [0-9]')
if [ "$check" != "" ]; then
fi
echo "have non number"
exit 3
if [ "$num" -lt 10 -o "$num" -gt 1000 ]; then
fi
echo "number no good"
exit 4
time echo "scale=${num}; 4*a(1)" | bc -l