Skip to content

Instantly share code, notes, and snippets.

@speechkey
Created May 9, 2012 18:54
Show Gist options
  • Save speechkey/2647963 to your computer and use it in GitHub Desktop.
Save speechkey/2647963 to your computer and use it in GitHub Desktop.
BASH/Ask for confirmation
read -p "Are you sure? " -n 1
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment