#!/bin/bash
if [[ $1 = 'tomcat' ]];
then
echo "Input is tomcat"
elif [[ $1 = 'redis' ]] || [[ $1 = 'zookeeper' ]];
then
echo "Input is $1"
else
echo "Input Is Error."
fi
#!/bin/bash
if [[ $1 = 'tomcat' ]];
then
echo "Input is tomcat"
elif [[ $1 = 'redis' ]] || [[ $1 = 'zookeeper' ]];
then
echo "Input is $1"
else
echo "Input Is Error."
fi
本文标题:shell 条件判断语句写法
本文链接:https://www.haomeiwen.com/subject/lcqkyhtx.html
网友评论