举个栗子:
#! /bin/bash echo -e "你真要想要执行此操作吗,yes or no?" read Confirm case $Confirm in y|Y|yes|Yes) echo "做你想做的事情吧" ;; *) echo "操作终止了!" esac
时间: 2024-11-05 20:38:04
举个栗子:
#! /bin/bash echo -e "你真要想要执行此操作吗,yes or no?" read Confirm case $Confirm in y|Y|yes|Yes) echo "做你想做的事情吧" ;; *) echo "操作终止了!" esac