linux shell 分支语句

#!/bin/sh
# test
echo -n "are you sure to delete these files?"
read ANS
case $ANS in
y|Y|yes|Yes)
        rm a.txt
        ;;
n|N|no|No)
        exit 0
        ;;
esac


你可能感兴趣的:(linux shell 分支语句)