Last active
February 10, 2019 23:21
-
-
Save mikybars/3dc445b401b38131a48098674e9f7e74 to your computer and use it in GitHub Desktop.
Bash 4.0+ case statement with fall-through:
https://stackoverflow.com/questions/5562253/switch-case-with-fallthrough
This file contains 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
echo -en "Directory ~/bin already exists, overwrite it? [Y/n]: " | |
read -n 1 action; echo | |
case "$action" in | |
'') ;& | |
[Yy]) rm -rf ~/bin;; | |
*) echo "Skipping directory ~/bin";; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment