Many of my scripts work with temporary files, usually relative to the scripts directory1,
while at the same time using set -e
to exit as soon as something fails.
In this scenario the script leaves behind these temporary files by default, which is not desireable.
We can however do a proper cleanup using the trap
concept.