Shell if...elif...fi 語句


#!/bin/shless


a=10ide

b=20it


if [ $a == $b ]io

thenclass

   echo "a is equal to b"di

elif [ $a -gt $b ]view

thenvi

   echo "a is greater than b"co

elif [ $a -lt $b ]editor

then

   echo "a is less than b"

else

   echo "None of the condition met"

fi

相關文章
相關標籤/搜索