Korn Shell

From EggeWiki
Revision as of 08:09, 4 April 2012 by Brianegge (talk | contribs) (Created page with "=== Enable tracing a function in ksh === Tracing can be enabled for a KornShell script by using "set -x", but this will have no effect on functions within the script. The fol...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Enable tracing a function in ksh

Tracing can be enabled for a KornShell script by using "set -x", but this will have no effect on functions within the script. The following line will enable tracing for all functions in a script:

<geshi lang="bash">

   typeset -ft $(typeset +f)

</geshi>

Note that this will not work for BASH.

[Idea is from Dan Mercer <dmercer@mn.rr.com>, news group comp.unix.shell]