Another post offered a solution for a self deleting shell script rm -- "$0"
If this line is inserted at the top of the script then the script will delete itself as soon as it starts running.
Is it possible to get the contents of the deleted script while it continues to run (meaning a process is still showing up via ps -eaf | grep scriptname)?