Skip to content

Instantly share code, notes, and snippets.

@kphrx
Created November 25, 2019 10:30
Show Gist options
  • Save kphrx/152181bd4029b5964799bbe8e4553888 to your computer and use it in GitHub Desktop.
Save kphrx/152181bd4029b5964799bbe8e4553888 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo -n "Default yes [Y/n]: "
read y
if [[ "${y:0:1}" == [nN] ]]; then
echo "Answer no."
exit 1
fi
echo -n "Default no [y/N]: "
read n
if [[ "${n:0:1}" == [yY] ]]; then
echo "Answer yes."
exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment