#!/usr/bin/env bash #This script was made on a request from one of my human # friends. He needed a folder that would delete itself when # leaves it. # # Press Ctrl+d to leave the folder and let it delete itself #time used to creaate uniques folders time=$(printf "%(%l%M%S)T\\n" "-1") mkdir temp_folder_"$time" __old_pwd__="$PWD" cd temp_folder_"$time" && "$SHELL" cd "$__old_pwd__" || exit rm -rf "temp_folder_$time"