-
-
Save sugamasao/318014 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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