In this tutorial we explain how to use the trap bash builtin to exit bash scripts cleanly. We explore example of how to clean up temp file, ensure services stay running and close ports.
Get the Free Newsletter!
Subscribe to Developer Insider for top news, trends, & analysis