Skip to content

Instantly share code, notes, and snippets.

@weygoldt
Created April 12, 2023 13:51
Show Gist options
  • Select an option

  • Save weygoldt/70188da7086eaa036c905a56bcecb406 to your computer and use it in GitHub Desktop.

Select an option

Save weygoldt/70188da7086eaa036c905a56bcecb406 to your computer and use it in GitHub Desktop.
A simple shell script that deletes itself.
#!/bin/bash
# Make sure to make a backup of me before you run me!
# This is a script that deletes itself!
# Why? Just for fun!
ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
echo "Bye!"
rm $ABSOLUTE_PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment