trap [function name] <reason>

Automatically execute commands after receiving signals by processes or the operating system

Arguments

NameDescription
function name
reason

Options

NameDescription
--print, -pPrints all defined signal handlers
--help, -hDisplays help about using this command