1 #!/bin/sh 2 echo "Is it morning? please answer me" 3 read timeofday 4 5 if [ $timeofday="yes" ]; if与 [] 之间必须有空格 6 then 7 echo "good morning" 8 else 9 echo "good afternoon" 10 fi 11 exit 0 12
1 #!/bin/sh 2 echo "Is it morning? please answer me" 3 read timeofday 4 5 if [ $timeofday="yes" ]; if与 [] 之间必须有空格 6 then 7 echo "good morning" 8 else 9 echo "good afternoon" 10 fi 11 exit 0 12
转载于:https://www.cnblogs.com/Browneyes/p/6509895.html