Skip to content

Instantly share code, notes, and snippets.

@nathandarnell
Created May 4, 2014 04:58
Show Gist options
  • Save nathandarnell/dde6b57761945c550498 to your computer and use it in GitHub Desktop.
Save nathandarnell/dde6b57761945c550498 to your computer and use it in GitHub Desktop.
while :
do
# show menu
echo -e "${green}${bold}Do you want to delete these failed backups? [y/n?]${NC}${normal}"
read yno
case $yno in
[yY] | [yY][Ee][Ss] )
echo "Agreed, which is to bad since it doesn't do anything yet.";
#Uncomment this to actually delete those bad backups sudo find $DIR/ -maxdepth 1 -mindepth 1 ! -name "*.img" -exec md5sum {} \;
exit 0
;;
[nN] | [n|N][O|o] )
echo "Not agreed, which is good since it doesn't do anything yet.";
exit 0
;;
*) echo "Invalid input. Yes or no please."
;;
esac
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment