#!/bin/bash
#echo "1.$12.$23.$3"
if [ "$2" == "+" ]
then
RES=`expr $1 + $3`
echo ">>the result is:$RES"
elif [ "$2" == "-" ]
then
RES=`expr $1 - $3`
echo ">>the result is:$RES"
#这里说明下,之所以不用“*”而用“x”,
#是因为在命令行输入*,shell解析用问题,
#*不能以参数的形式传递给脚本,所以就用x代替了,
#这样能规避这个问题,但是我仍然不知道*在命令行不能传递给脚本,
#那位大侠能帮忙解释下,非常感谢~
elif [ "$2" == "x" ]then
RES=`expr $1 \* $3`
echo ">>the result is:$RES"
elif [