create temporary directory with random name which will be deleted after script run
WDIR="$(mktemp -d "/tmp/${0}.XXXXXX")"
trap 'rm -rf "${WDIR}"' EXIT INT HUP
Written by Andre Timmermann
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Related Tags
#bash
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#