Forrest logo
back to context overview

trap

List of commands for trap:

  • trap:tldr:5ae56 trap: List active traps for the current shell.
    $ trap -p
    try on your machine
    explain this command
  • trap:tldr:bc168 trap: Set a trap to execute commands when one or more signals are detected.
    $ trap 'echo "Caught signal ${SIGHUP}"' ${SIGHUP}
    try on your machine
    explain this command
  • trap:tldr:eac20 trap: List available signals to set traps for.
    $ trap -l
    try on your machine
    explain this command
back to context overview