Skip to content

Instantly share code, notes, and snippets.

@ideaflare
Created September 2, 2017 19:34
Show Gist options
  • Select an option

  • Save ideaflare/b100c7540ea77544770bfc618ff85a07 to your computer and use it in GitHub Desktop.

Select an option

Save ideaflare/b100c7540ea77544770bfc618ff85a07 to your computer and use it in GitHub Desktop.
Useful bashrc additions
# 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