Created
September 2, 2017 19:34
-
-
Save ideaflare/b100c7540ea77544770bfc618ff85a07 to your computer and use it in GitHub Desktop.
Useful bashrc additions
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
| # Delete | |
| slice() { | |
| if [ $# -eq 0 ] | |
| then | |
| echo "No arguments supplied" | |
| else | |
| read -p "Sure you want to : shred -vzu $1? " -n 1 -r | |
| echo # (optional) move to a new line | |
| if [[ $REPLY =~ ^[Yy]$ ]] | |
| then | |
| # do dangerous stuff | |
| shred -vzu "$1" | |
| else | |
| echo "phew! disaster avoided :)" | |
| fi | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment