-
-
Save liamnewmarch/8e3c7bcd306ec10b18c1b62ac51d86ad to your computer and use it in GitHub Desktop.
Copy and paste commands from the internet worry free*!
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
#!/bin/bash | |
printf 'Are you sure you want to run this command? [Y/n] ' | |
read -r yn | |
case $yn in | |
[Yy]* | '' ) | |
"$@" | |
;; | |
* ) | |
exit 1 | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment