看到这个脚本,我想弄清楚什么语言被使用......它几乎像C但我注意到了fi作为关闭嵌套if的方法。什么语言使用“fi”
function prompt() {
if [ "$noprompt" ] && [ "$#" = "1" ]; then
if [ "$1" = "yes" ]; then
echo "DEFAULT: yes"
return 0
else
echo "DEFAULT: no"
return 1
fi
fi
while true; do
echo "Enter \"yes\" or \"no\": "
read response
case $response
in
Y*) return 0 ;;
y*) return 0 ;;
N*) return 1 ;;
n*) return 1 ;;
*)
esac
done
}
Shell脚本。可能是sh,bash或类似的 – Dirk 2011-06-10 17:33:25