Skip to content

Instantly share code, notes, and snippets.

@sugamasao
Created March 1, 2010 02:08
Show Gist options
  • Save sugamasao/318014 to your computer and use it in GitHub Desktop.
Save sugamasao/318014 to your computer and use it in GitHub Desktop.
#!/bin/sh
INPUT_MESSAGE="exec ok?[Y/n] ";
# OK Cancel のアレ
while [ "${READ_KEY}" != "Y" ] && [ "${READ_KEY}" != "n" ]; do
echo -n "${INPUT_MESSAGE}"
read READ_KEY;
done;
# n だったら終了するよ
if [ "${READ_KEY}" = "n" ]; then
exit 1;
fi
echo "なんか処理する"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment