Builtins
A
builtin
is a utility (also called a
command
) that is built into a shell. Each of the
The
echo
utility is a shell builtin. The shell always executes a shell builtin before trying to find a command or utility with the same
Listing bash builtins
To get a complete list of
bash
builtins, give the command
Because bash was written by GNU, the info page has better information than does the man page. If you want to read about builtins in the man page, give the command man bash and then search for the section on builtins with the command /^SHELL BUILTIN COMMANDS (search for a line that begins with SHELL . . . ). |
Chapter Summary
The shell is the Linux command interpreter. It
When you give it a command, the shell
When it executes a command, the shell
When a command runs in the foreground, the shell waits for it to finish before it displays a prompt and allows you to continue. When you put an ampersand ( & ) at the end of a command line, the shell executes the command in the background and displays another prompt immediately. Run slow commands in the background when you want to enter other commands at the shell prompt. The jobs builtin displays a list of jobs and includes the job number of each.
The shell interprets special characters on a command line to generate filenames. A question mark represents any single character, and an asterisk represents zero or more characters. A single character may also be represented by a character class: a list of characters within brackets. A reference that uses special
A builtin is a utility that is built into a shell. Each shell has its own set of builtins. When it runs a builtin, the shell does not fork a new process. Consequently builtins run more quickly and can affect the environment of the current shell. Utilities and Builtins Introduced in This ChapterTable 7-1 lists the utilities introduced in this chapter. Table 7-1. New utilities
|