Builtins
Builtins are commands that are part of (built into) the shell. When you give a simple filename as a command, the shell first checks whether it is the name of a builtin. If it is, the shell executes it as part of the calling process; the shell does not fork a new process to execute the builtin. The shell does not need to search the directory structure for builtin programs because they are immediately available to the shell.
If the simple filename is not a builtin, the shell searches the directory structure for the program you want, using the PATH variable as a guide. When it finds the program, the shell forks a new process to execute the program.
Although they are not listed in Table 14-11, all the control structure keywords (if, foreach, ...
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