shell脚本备忘

chmod +x filename
#!/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

你可能感兴趣的:(shell,脚本,备忘录)