Y
Hacker News
new
|
ask
|
show
|
jobs
by
lioeters
449 days ago
Useful tip, I suppose it will look like:
temp=$(mktemp) trap 'unlink $temp' EXIT # Do things
1 comments
Galanwe
449 days ago
Exactly. And if your cleanup is more involved you can call a cleanup function.
link