Jobs and Processes
When a script is run, the shell goes through several steps to begin the execution. Basically, the current shell opens the executable file, sees that it is a script (not a compiled and linked program executable), and creates a new process, running the shell indicated in the first line of the script file. If the script file does not have the #! /bin/ksh in the first line, the current shell creates a process running the same shell program as the shell from which the script was executed.
Most of what happens is internal and of no concern unless you are studying the kernel, in which case you want a book on UNIX internals and C programming, not on shell programming. From the scripter's perspective, what happens is that a process ...
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.