Using Trap to Exit Bash Shell Scripts Cleanly - Linux Tutorial

Publié le: 06 février 2020
sur la chaîne: Putorius Linux Tutorials
4,874
120

In this Bash tutorial we will show you how to use trap to exit a script cleanly. It can be used to clean up temporary files, ensure service availability after a script exits, ensure ports are secured and much more.

A text version of this tutorial can be found here:
https://www.putorius.net/using-trap-t...

0:00 Introduction to Bash Exit Trap
0:49 What is trap?
1:31 The wrong way to clean up on script exit
2:05 How to use trap on exit to clean up temporary files
2:53 Using traps to ensure service availability
3:31 Ensure ports are closed after script exit
4:02 Using a function in a trap call
4:20 Conclusion


Sur cette page du site, vous pouvez voir la vidéo en ligne Using Trap to Exit Bash Shell Scripts Cleanly - Linux Tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Putorius Linux Tutorials 06 février 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,874 fois et il a aimé 120 téléspectateurs. Bon visionnage!