【发布时间】:2013-02-21 19:08:56
【问题描述】:
我只想知道如何读取一个字符串然后比较它。如果是“加号”,则继续
#!/bin/bash
echo -n Enter the First Number:
read num
echo -n Please type plus:
read opr
if [ $num -eq 4 && "$opr"= plus ]; then
echo this is the right
fi
【问题讨论】:
标签: string bash command-line terminal