Syntax Checking

Before you take a look at some of the debugging options, let's review the three primary ways to execute a script. Scripts can be run in a subshell, run in the context of the current shell, or a separate ksh command can be issued to customize the debugging environment.

From a debugging perspective, you can present options to the ksh command specifying debugging options such as -v or -x. This technique creates a new process running ksh, and that shell creates another process running ksh with your script as stdin.

The trick is that the ksh command can be used as a standalone command requesting the creation of a process running ksh. This might be used in the case of a hapless C shell user who is stuck in a company steeped in the culture ...

Get Korn Shell Programming by Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.