shell/结构化命令/正确使用大于小于号.sh

13 lines
173 B
Bash
Raw Normal View History

2016-05-13 21:42:54 +08:00
#!/bin/bash
#正确使用大于小于号
val1=baseball
val2=hocky
if [ $val1 \> $val2 ]
then
echo "$val1 is greater than $val2"
else
echo "$val1 is less than $val2"
fi