【发布时间】:2013-01-03 15:51:01
【问题描述】:
在我的 bash 脚本中,我尝试使用等号 (=) 运算符作为 IF 语句的输入,可以这样做吗?
echo "Plese enter an operator as shown in the brackets (-)subtract, (*)Multiply, (+)Add, (/)divide, quit(=)?"
read operator
..........
if [[ $operator == '=' ]]; then
'do something'
fi
【问题讨论】:
-
你试过了吗?成功了吗?
标签: linux bash shell command-line sh