Don Marti
Fri 22 Aug 2014 11:46:57 AM PDT
Temporary directory for a shell script
Set up a temporary directory to use in a Bash script, and clean it up when the script finishes:
TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT
Fri 22 Aug 2014 11:46:57 AM PDT
Set up a temporary directory to use in a Bash script, and clean it up when the script finishes:
TMPDIR=$(mktemp -d)
trap "rm -rf $TMPDIR" EXIT