简单的Shell脚本

输入一个月份求出季节

#!/bin/bash

read -p "Enter month:" num

case $[$[$num-1]/3] in
        0)
                echo "Spring"
                ;;
        1)
                echo "Summer"
                ;;
        2)
                echo "Autumn"
                ;;
        3)
                echo "Winter"
                ;;
        *)
                echo "Please enter the correct month!"
                sh input.sh
esac