From 1f30cb4fe3fcf99f079d181b60de96d8ed719e67 Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 7 Jul 2024 21:21:26 +0100 Subject: [PATCH] Add suicidal_script.sh --- README.md | 1 + suicidal_script.sh | 4 ++++ 2 files changed, 5 insertions(+) create mode 100755 suicidal_script.sh diff --git a/README.md b/README.md index 7940325..d63de23 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ Intended for use when a program that outputs to `stdout` is called from a non-terminal or graphical program, making the `stdout` output inaccessible. The output can instead be piped into this script to make it readable as a system notification. - `stopwatch.sh`: simple stopwatch script that counts the elapsed time in seconds, and displays it in the format HH:MM:SS. + - `suicidal_script.sh`: a script that deletes itself. Doesn't do anything, just a proof of concept. - `sync_music.sh`: script to sync my Android phone's music library to the contents of my `~/media/music/` directory, i.e. copy my music library from my laptop to my phone. - `trippy.sh`: script that displays random visual data to the screen (only works when called from a TTY). diff --git a/suicidal_script.sh b/suicidal_script.sh new file mode 100755 index 0000000..6b87dd7 --- /dev/null +++ b/suicidal_script.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# A script that deletes itself + +rm "$(echo $0 | awk -F '/' '{print $NF}')"