Translate

Image of Linux Kernel Development (3rd Edition)
Image of Operating System Concepts
Image of XSLT 2.0 and XPath 2.0 Programmer's Reference (Programmer to Programmer)
Image of Beginning Google Maps API 3

Korn Shell DEBUG Trap

The trap shell builtin is used to change the way signals are handled by the Korn Shell 93 (ksh93) shell. In addition, a trap may be set for three ksh93 pseudo-signals: EXIT, ERR, and DEBUG. In this post we demonstrate how to use the DEBUG pseudo-signal to trap changes in the value of a variable for debugging purposes. trap [ -p ] [ action ] [ sig ] . . . The -p option causes the trap action associated with each trap as specified by the arguments to be printed with appropriate quoting. Otherwise, action will be processed as if