Skip to content

Instantly share code, notes, and snippets.

@obvionaoe
Created February 3, 2022 20:09
Show Gist options
  • Save obvionaoe/3f03e1570d737c8ce2b8d97253ad60ea to your computer and use it in GitHub Desktop.
Save obvionaoe/3f03e1570d737c8ce2b8d97253ad60ea to your computer and use it in GitHub Desktop.
A way to remove the script being executed in Bash
#!/bin/sh
rm "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/$(basename "${BASH_SOURCE[0]}")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment