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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access