Skip to content

Instantly share code, notes, and snippets.

@pce
Last active December 13, 2015 23:49
Show Gist options
  • Select an option

  • Save pce/4994391 to your computer and use it in GitHub Desktop.

Select an option

Save pce/4994391 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
USAGE="$0 <arg1>"
if [ $# -eq 0 ] ; then
echo $USAGE
exit 1
fi
read -p "Are you sure to $1? " -n 1
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
exit 1
fi
echo "process data"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment