trap

From RaySoft

Defines and activates handlers to be run when the shell receives signals or other conditions.[1]

Documentation

Syntax

trap [PARAMETER ...] [[COMMAND] SIGNAL ...]

Parameters

-l
Print a list of signal names and their corresponding numbers.
-p
Display the trap COMMANDs associated with each SIGNAL.

References

  1. bash -c 'help trap'