TE
TechEcho
Home
24h Top
Newest
Best
Ask
Show
Jobs
English
GitHub
Twitter
Home
Create a temp file within the scope of a script(even the script crashes)
2 points
by
socrateslee
about 2 years ago
1 comment
socrateslee
about 2 years ago
# create temporary file tldr: tmpfile=$(mktemp /tmp/abc-script.XXXXXX) exec 3>"$tmpfile" exec 4<"$tmpfile" rm "$tmpfile" # rest scripts