【发布时间】:2011-10-24 01:27:21
【问题描述】:
我一直在到处寻找解释。下面是一个来自 apt-fast.sh 脚本的真实示例:
if [ ! -x /usr/bin/axel ]
then echo "axel is not installed, perform this?(y/n)"
read ops
case $ops in
y) if apt-get install axel -y --force-yes
then echo "axel installed"
else echo "unable to install the axel. you are using sudo?" ; exit
fi ;;
n) echo "not possible usage apt-fast" ; exit ;;
esac
fi
"fi ;;" 在if 块中间有什么用?
【问题讨论】:
-
what language uses "fi" 的可能重复项
-
@ajreal 不,这个问题没有解释“fi ;;”的用途是。
标签: bash if-statement