Builtins

Commands that are built into a shell do not fork a new process when you execute them. The following sections discuss the exec and trap builtins and are followed by Table 13-6 on page 670, which lists many of the shell builtins.

exec: Executes a Command

The exec builtin has two primary purposes: to run a command without creating a new process and to redirect standard input, output, or error of a shell script from within the script. When the shell executes a command that is not built into the shell, it typically creates a new process. The new process inherits environment (global or exported) variables from its parent but does not inherit ...

Get A Practical Guide to Red Hat® Linux® 8 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.