Skip to content

Instantly share code, notes, and snippets.

@ksindi
Created April 9, 2017 20:57
Show Gist options
  • Save ksindi/5e840bb2bcc143f6f86674f3fcca4c77 to your computer and use it in GitHub Desktop.
Save ksindi/5e840bb2bcc143f6f86674f3fcca4c77 to your computer and use it in GitHub Desktop.
delcheck() {
to_del=$1
read -p "Delete ${to_del}? [y/N] " doit
case "$doit" in
[yY]) rm -rf "$to_del";;
*) printf 'No files deleted\nExiting...\n'; exit 1;
esac
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment