日期:2014-05-16 浏览次数:20760 次
[ $var == ALL ] && { rm filelist.txt rm /home/master/.mednafen/mcs/* exit }
[ $var == EXIT ] && { rm filelist.txt exit }
[ $var == ALL ] && rm filelist.txt &&rm /home/master/.mednafen/mcs/*&& exit
[ $var == EXIT ] && rm filelist.txt&& exit
#!/bin/sh
echo "This script is to delete the autosaves that mednafen create"
echo "Is this OK?"
select var in "Yes" "No"; do
break
done
[ "$var" = "No" ] && exit
while [ "$var" != "EXIT" ]; do
ls /home/master/.mednafen/mcs < filelist.txt
echo "What file would you like to delete?"
select var in `cat filelist.txt` "ALL" "EXIT"; do
break
done
if [ "$var" == "ALL" ]; then
rm filelist.txt
rm /home/master/.mednafen/mcs/*
exit
elif [ "$var" == "EXIT" ]; then
rm filelist.txt
exit
fi
rm /home/master/.mednafen/mcs/$var
done