Here is a small script that does two things:
- Determinate script’s location
- Delete the file
#!/usr/bin/env bash
// determinate where the script is
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
// delete the script
rm -f $SCRIPT_DIR/test.sh