# Exit event handler
      function on_exit() {
        tput cnorm # Show cursor. You need this if animation is used.
        command
        exit 0 # Exit gracefully.
      }
      
      # Put this line at the beginning of your script (after functions used by event handlers).
      # Register exit event handler.
      trap on_exit EXIT
      Shell language logo

      event on exit

      Shell public recipes

      Shortcut: event.exit

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.