Chapter 4: Shell Builtin Commands

48

supplied, and mode is omitted, the output is in a form that may be reused as input. The return status is zero if the mode is successfully changed or if no mode argument is supplied, and non-zero otherwise.

Note that when the mode is interpreted as an octal number, each number of the umask is subtracted from 7. Thus, a umask of 022 results in permissions of 755. unset unset [-fnv] [name]

Remove each variable or function name. If the -v option is given, each name refers to a shell variable and that variable is remvoved. If the -f option is given, the names refer to shell functions, and the function definition is removed. If the -n option is supplied, and name is a variable with the nameref attribute, name will be unset rather than the variable it references. -n has no effect if the -f option is supplied. If no options are supplied, each name refers to a variable; if there is no variable by that name, any function with that name is unset. Readonly variables and functions may not be unset. The return status is zero unless a name is readonly.

4.2 Bash Builtin Commands

This section describes builtin commands which are unique to or have been extended in

Bash. Some of these commands are specified in the posix standard. alias alias [-p] [name[=value] ...]

Without arguments or with the -p option, alias prints the list of aliases on the standard output in a form that allows them to be reused as input. If arguments are supplied, an alias is defined for each name whose value is given. If no value is given, the name and value of the alias is printed. Aliases are described in

Section 6.6 [Aliases], page 88. bind bind [-m keymap] [-lpsvPSVX] bind [-m keymap] [-q function] [-u function] [-r keyseq] bind [-m keymap] -f filename bind [-m keymap] -x keyseq:shell-command bind [-m keymap] keyseq:function-name bind readline-command

Display current Readline (see Chapter 8 [Command Line Editing], page 101) key and function bindings, bind a key sequence to a Readline function or macro, or set a Readline variable.

Each non-option argument is a command as it would appear in a Readline initialization file (see Section 8.3 [Readline Init

File], page 104), but each binding or command must be passed as a separate argument; e.g., ‘"\C-x\C-r":re-read-init-file’.

Options, if supplied, have the following meanings: