#!/bin/bash
if [ $1 -lt 3 ];then
echo redhat
elif [ $1 -eq 3 ];then
echo green
elif [ $1 -gt 3 -a $1 -lt 5 ];then
echo yellow
else
echo white
fi
case $1 in
1|one|first)echo redhat;;
2)echo yellow;;
3)echo green;;
*)echo blue;;
esac
转载于:https://blog.51cto.com/13560258/2065298