Last active
December 19, 2015 05:49
-
-
Save achalddave/5907011 to your computer and use it in GitHub Desktop.
optimal idiot proofing
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
function rm { | |
if [[ "$1" == "-rf" ]] ; then | |
echo "If you really want to delete this, say 'I may be an idiot'." | |
read var | |
if [[ "$var" != 'I may be an idiot' ]] ; then | |
echo "Nope, you didn't write that correctly" | |
return | |
fi | |
fi | |
rm "$@" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment