Create a temp file within the scope of a script(even the script crashes) (unix.stackexchange.com) 2 points by socrateslee 3y ago ↗ HN
[–] socrateslee 3y ago ↗ # create temporary file tldr: tmpfile=$(mktemp /tmp/abc-script.XXXXXX) exec 3>"$tmpfile" exec 4<"$tmpfile" rm "$tmpfile" # rest scripts
1 comment
[ 0.22 ms ] story [ 12.1 ms ] thread