新手: 关于 ifthen的问题。谢谢回复
发表于 : 2009-12-14 14:49
我的代码是:
#!/bin/bash
#This program is used to study if then
#user 2009/12/14
if [ "$1" = "hello" ]; then
echo "Hello! How are you ?"
elif [ "$1" = " " ]; then
echo "You MUST input parameters"
else
echo "The only accept parameter is hello"
fi
elif [ "$1" = " " ]; then
echo "You MUST input parameters" 这两行代码始终不执行,请问是什么原因阿?谢谢
#!/bin/bash
#This program is used to study if then
#user 2009/12/14
if [ "$1" = "hello" ]; then
echo "Hello! How are you ?"
elif [ "$1" = " " ]; then
echo "You MUST input parameters"
else
echo "The only accept parameter is hello"
fi
elif [ "$1" = " " ]; then
echo "You MUST input parameters" 这两行代码始终不执行,请问是什么原因阿?谢谢