TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Create a temp file within the scope of a script(even the script crashes)

2 pointsby socratesleeabout 2 years ago

1 comment

socratesleeabout 2 years ago
# create temporary file tldr: tmpfile=$(mktemp /tmp/abc-script.XXXXXX) exec 3>"$tmpfile" exec 4<"$tmpfile" rm "$tmpfile" # rest scripts