shell的问题

wugui414 wugui414 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
if[ "$1"=="hello" ];then
echo "Hello,how are you?"
elif[ "$1"=="" ];then
echo "You MUST input parameters, ex>$0 some word"
else
echo "The only parameter is 'hello'"
fi


这语法有错吗?为什么总是报这样的错误?
sh08.sh: line 9: syntax error near unexpected token `then'
sh08.sh: line 9: `if[ "$1"=="hello" ];then'
...全文

相关推荐

评论 5
收藏 已收藏
分享
返回顶部
wugui414
Linux/Unix社区 18,828 成员 11,488 内容