Last active
December 16, 2016 17:36
-
-
Save brianoflan/80f3aec3d3033ceab19ddab36b1dbe03 to your computer and use it in GitHub Desktop.
mktemp (mktmp, tmp, TMPDIR, make temporary file, make temporary folder, make tmp, make temporary dir, make temporary directory)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mktmpd() { | |
local tmpd=`mktemp -d "${TMPDIR:-/tmp}/tmp.d.XXXXXXXXXX"` ; | |
echo "$tmpd" ; | |
} | |
MkTemp() { | |
local tmpf=`mktemp "${TMPDIR:-/tmp}/tmp.XXXXXXXXXX"` ; | |
echo "Temporary file: $tmpf" ; | |
local tmpd=`mktemp -d "${TMPDIR:-/tmp}/tmp.d.XXXXXXXXXX"` ; | |
echo "Temporary folder: $tmpd" ; | |
} | |
MkTemp ; | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment