摘要:
1 # /bin/bash 2 3 echo -n login: 4 read name 5 echo -n password: 6 read passwd 7 8 if [ $name = "chat" -a $passwd = "abc" ]; then 9 echo "the host and passwdrd is right!"10 else11 echo "input is error!"12 fi13 14 #end注意:if语句的格式: if [space judge_condition space 阅读全文