With bash, `set -x' is global so users can debug a script by `bash -x
foo.sh' and every function will be traced. But with ksh, `set -x' does not
affect functions defined in the `function NAME' syntax which I think is not
convenient. Seems like ksh treats `set -x' the same way as a trap.
Example:
$ cat foo.sh
function f1 { echo f1; }
function f2 { echo f2; }
f1
f2
$ bash -x foo.sh
+ f1
+ echo f1
f1
+ f2
+ echo f2
f2
$ ksh -x foo.sh
+ f1
f1
+ f2
f2
$
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users