]> git.ipfire.org Git - thirdparty/bash.git/blobdiff - doc/bashref.texi
changes for quoting special and multibyte characters in glob patterns; changes to...
[thirdparty/bash.git] / doc / bashref.texi
index 9eeab73594e5233d55dd94f07616153dfba35aa5..4aa9ed88c7ded9ab330ece4d325593ed62dfe32c 100644 (file)
@@ -475,8 +475,8 @@ when in double quotes (@pxref{Shell Parameter Expansion}).
 @subsubsection ANSI-C Quoting
 @cindex quoting, ANSI
 
-Character sequences of the form $'@var{string}' are treated as a special
-kind of single quotes.
+Character sequences of the form @code{$'@var{string}'} are treated as
+a special kind of single quotes.
 The sequence expands to @var{string}, with backslash-escaped characters
 in @var{string} replaced as specified by the ANSI C standard.
 Backslash escape sequences, if present, are decoded as follows:
@@ -795,8 +795,7 @@ shell builtins, shell functions, and pipelines.  An external
 When the shell is in @sc{posix} mode (@pxref{Bash POSIX Mode}), @code{time}
 may be followed by a newline.  In this case, the shell displays the
 total user and system time consumed by the shell and its children.
-The @env{TIMEFORMAT} variable may be used to specify the format of
-the time information.
+The @env{TIMEFORMAT} variable specifies the format of the time information.
 
 If the pipeline is not executed asynchronously (@pxref{Lists}), the
 shell waits for all commands in the pipeline to complete.
@@ -1954,7 +1953,7 @@ command substitution.
 
 After these expansions are performed, quote characters present in the
 original word are removed unless they have been quoted themselves
-(@dfn{quote removal}).
+(@dfn{quote removal}). @xref{Quote Removal} for more details.
 
 Only brace expansion, word splitting, and filename expansion
 can increase the number of words of the expansion; other expansions
@@ -1964,9 +1963,6 @@ The only exceptions to this are the expansions of
 @code{"$@{@var{name}[@@]@}"} and @code{$@{@var{name}[*]@}}
 (@pxref{Arrays}).
 
-After all expansions, @code{quote removal} (@pxref{Quote Removal})
-is performed.
-
 @node Brace Expansion
 @subsection Brace Expansion
 @cindex brace expansion
@@ -2181,6 +2177,14 @@ If @var{parameter} is unset or null, the expansion of
 $ v=123
 $ echo $@{v-unset@}
 123
+$ echo $@{v:-unset-or-null@}
+123
+$ unset v
+$ echo $@{v-unset@}
+unset
+$ v=
+$ echo $@{v:-unset-or-null@}
+unset-or-null
 @end example
 
 @item $@{@var{parameter}:=@var{word}@}
@@ -2628,26 +2632,27 @@ expansion as described below.
 
 Command substitution allows the output of a command to replace
 the command itself.
-Command substitution occurs when a command is enclosed as follows:
+The standard form of command substitution occurs when a command is
+enclosed as follows:
 @example
 $(@var{command})
 @end example
 @noindent
-or
+or (deprecated)
 @example
-`@var{command}`
+`@var{command}`.
 @end example
 
 @noindent
-Bash performs the expansion by executing @var{command} in a subshell environment
-and replacing the command substitution with the standard output of the
-command, with any trailing newlines deleted.
+Bash performs command substitution by executing @var{command} in a subshell
+environment and replacing the command substitution with the standard
+output of the command, with any trailing newlines deleted.
 Embedded newlines are not deleted, but they may be removed during
 word splitting.
 The command substitution @code{$(cat @var{file})} can be
 replaced by the equivalent but faster @code{$(< @var{file})}.
 
-When the old-style backquote form of substitution is used,
+With the old-style backquote form of substitution,
 backslash retains its literal meaning except when followed by
 @samp{$}, @samp{`}, or @samp{\}. 
 The first backquote not preceded by a backslash terminates the
@@ -2655,11 +2660,73 @@ command substitution.
 When using the @code{$(@var{command})} form, all characters between
 the parentheses make up the command; none are treated specially.
 
+There is an alternate form of command substitution:
+
+@example
+$@{@var{c} @var{command}; @}
+@end example
+
+@noindent
+which executes @var{command} in the current execution environment
+and captures its output, again with trailing newlines removed.
+
+The character @var{c} following the open brace must be a space, tab,
+newline, or @samp{|}, and the close brace must be in a position
+where a reserved word may appear (i.e., preceded by a command terminator
+such as semicolon).
+Bash allows the close brace to be joined to the remaining characters in
+the word without being followed by a shell metacharacter as a reserved
+word would usually require.
+
+Any side effects of @var{command} take effect immediately
+in the current execution environment and persist in the current 
+environment after the command completes (e.g., the @code{exit} builtin
+will exit the shell).
+
+This type of command substitution superficially resembles executing an
+unnamed shell function: local variables are created as when a shell
+function is executing, and the @code{return} builtin forces
+@var{command} to complete;
+however, the rest of the execution environment,
+including the positional parameters, is shared with the caller.
+
+If the first character following the open brace
+is a @samp{|}, the construct expands to the
+value of the @code{REPLY} shell variable after @var{command} executes,
+without removing any trailing newlines,
+and the standard output of @var{command} remains the same as in the
+calling shell.
+Bash creates @code{REPLY} as an initially-unset local variable when
+@var{command} executes, and restores @code{REPLY} to the value it had
+before the command substitution after @var{command} completes,
+as with any local variable.
+
+For example, this construct expands to @samp{12345}, and leaves the
+shell variable @code{X} unchanged in the current execution environment:
+
+@example
+
+$@{ local X=12345 ; echo $X; @}
+@end example
+
+@noindent
+(not declaring @code{X} as local would modify its value in the current
+environment, as with normal shell function execution),
+while this construct does not require any output to expand to
+@samp{12345}:
+
+@example
+$@{| REPLY=12345; @}
+@end example
+
+@noindent
+and restores @code{REPLY} to the value it had before the command substitution.
+
 Command substitutions may be nested.  To nest when using the backquoted
 form, escape the inner backquotes with backslashes.
 
-If the substitution appears within double quotes, word splitting and
-filename expansion are not performed on the results.
+If the substitution appears within double quotes, Bash does not perform
+word splitting and filename expansion on the results.
 
 @node Arithmetic Expansion
 @subsection Arithmetic Expansion
@@ -2838,6 +2905,10 @@ To get the old behavior of ignoring filenames beginning with a
 The @code{dotglob} option is disabled when @env{GLOBIGNORE}
 is unset.
 
+After the pattern is expanded and matched against filenames, the value of the
+@env{GLOBSORT} variable controls how the results are sorted, as described
+below (@pxref{Bash Variables}).
+
 @node Pattern Matching
 @subsubsection Pattern Matching
 @cindex pattern matching
@@ -3030,7 +3101,7 @@ before the standard output was redirected to @var{dirlist}.
 Bash handles several filenames specially when they are used in
 redirections, as described in the following table.
 If the operating system on which Bash is running provides these
-special files, bash will use them; otherwise it will emulate them
+special files, Bash will use them; otherwise it will emulate them
 internally with the behavior described below.
 
 @table @code
@@ -3156,9 +3227,9 @@ This is semantically equivalent to
 
 @subsection Here Documents
 This type of redirection instructs the shell to read input from the
-current source until a line containing only @var{word}
-(with no trailing blanks) is seen.  All of
-the lines read up to that point are then used as the standard
+current source until a line containing only @var{delimiter}
+(with no trailing blanks) is seen.
+All of the lines read up to that point are then used as the standard
 input (or file descriptor @var{n} if @var{n} is specified) for a command.
 
 The format of here-documents is:
@@ -3170,10 +3241,13 @@ The format of here-documents is:
 
 No parameter and variable expansion, command substitution,
 arithmetic expansion, or filename expansion is performed on
-@var{word}.  If any part of @var{word} is quoted, the
+@var{word}.
+
+If any part of @var{word} is quoted, the
 @var{delimiter} is the result of quote removal on @var{word},
 and the lines in the here-document are not expanded.
 If @var{word} is unquoted,
+@var{delimiter} is @var{word} itself,
 all lines of the here-document are subjected to
 parameter expansion, command substitution, and arithmetic expansion,
 the character sequence @code{\newline} is ignored, and @samp{\}
@@ -3813,7 +3887,7 @@ The return status is zero unless @var{n} is not greater than or equal to 1.
 @item cd
 @btindex cd
 @example
-cd [-L|[-P [-e]] [-@@] [@var{directory}]
+cd [-L|[-P [-e]]] [-@@] [@var{directory}]
 @end example
 
 Change the current working directory to @var{directory}.
@@ -3942,6 +4016,14 @@ The return status is zero unless an invalid option is supplied, one of
 the names is not a valid shell variable name, or @option{-f} is supplied
 with a name that is not a shell function.
 
+@item false
+@btindex false
+@example
+false
+@end example
+
+Does nothing, returns a non-zero status.
+
 @item getopts
 @btindex getopts
 @example
@@ -4003,15 +4085,16 @@ If @code{getopts} is silent, then a colon (@samp{:}) is placed in
 hash [-r] [-p @var{filename}] [-dt] [@var{name}]
 @end example
 
-Each time @code{hash} is invoked, it remembers the full pathnames of the
+Each time @code{hash} is invoked, it remembers the full filenames of the
 commands specified as @var{name} arguments,
 so they need not be searched for on subsequent invocations.
 The commands are found by searching through the directories listed in
 @env{$PATH}.
-Any previously-remembered pathname is discarded.
+Any previously-remembered filename is discarded.
 The @option{-p} option inhibits the path search, and @var{filename} is
 used as the location of @var{name}.
 The @option{-r} option causes the shell to forget all remembered locations.
+Assigning to the @env{PATH} variable also clears all hashed filenames.
 The @option{-d} option causes the shell to forget the remembered location
 of each @var{name}.
 If the @option{-t} option is supplied, the full pathname to which each
@@ -4213,8 +4296,30 @@ The expression is parsed and evaluated according to precedence
 using the rules listed above.
 @end table
 
-When used with @code{test} or @samp{[}, the @samp{<} and @samp{>}
+If the shell is not in @sc{posix} mode,
+when used with @code{test} or @samp{[}, the @samp{<} and @samp{>}
 operators sort lexicographically using ASCII ordering.
+If the shell is in @sc{posix} mode, these operators use the current locale.
+
+The historical operator-precedence parsing with 4 or more arguments can
+lead to ambiguities when it encounters strings that look like primaries.
+The @sc{posix} standard has deprecated the @option{-a} and @option{-o}
+primaries and enclosing expressions within parentheses.
+Scripts should no longer use them.
+It's much more reliable to restrict test invocations to a single primary,
+and to replace uses of @option{-a} and @option{-o} with the shell's
+@code{&&} and @code{||} list operators. For example, use
+
+@example
+test -n string1 && test -n string2
+@end example
+
+@noindent
+instead of
+
+@example
+test -n string1 -a -n string2
+@end example
 
 @item times
 @btindex times
@@ -4301,6 +4406,14 @@ values in a subshell or subshell environment when one is created.
 The return status is zero unless a @var{sigspec} does not specify a
 valid signal.
 
+@item true
+@btindex true
+@example
+true
+@end example
+
+Does nothing, returns a 0 status.
+
 @item umask
 @btindex umask
 @example
@@ -5271,6 +5384,8 @@ parameters, or to display the names and values of shell variables.
 @example
 set [-abefhkmnptuvxBCEHPT] [-o @var{option-name}] [--] [-] [@var{argument} @dots{}]
 set [+abefhkmnptuvxBCEHPT] [+o @var{option-name}] [--] [-] [@var{argument} @dots{}]
+set -o
+set +o
 @end example
 
 If no options or arguments are supplied, @code{set} displays the names
@@ -5351,7 +5466,15 @@ This option is ignored by interactive shells.
 
 @item -o @var{option-name}
 
-Set the option corresponding to @var{option-name}:
+Set the option corresponding to @var{option-name}.
+If @option{-o} is supplied with no @var{option-name},
+@code{set} prints the current shell options settings.
+If @option{+o} is supplied with no @var{option-name},
+@code{set} prints a series of
+@code{set}
+commands to recreate the current option settings
+on the standard output.
+Valid option names are:
 
 @table @code
 @item allexport
@@ -5614,12 +5737,16 @@ option.
 The list of @code{shopt} options is:
 @table @code
 
-@item assoc_expand_once
-If set, the shell suppresses multiple evaluation of associative array
-subscripts during arithmetic expression evaluation, while executing
+@item array_expand_once
+If set, the shell suppresses multiple evaluation of
+associative and indexed array subscripts
+during arithmetic expression evaluation, while executing
 builtins that can perform variable assignments,
 and while executing builtins that perform array dereferencing.
 
+@item assoc_expand_once
+Deprecated; a synonym for @code{array_expand_once}. 
+
 @item autocd
 If set, a command name that is the name of a directory is executed as if
 it were the argument to the @code{cd} command.
@@ -5687,7 +5814,7 @@ completed.
 This means that dollar signs in variable names that expand to directories
 will not be quoted;
 however, any dollar signs appearing in filenames will not be quoted, either.
-This is active only when bash is using backslashes to quote completed
+This is active only when Bash is using backslashes to quote completed
 filenames.
 This variable is set by default, which is the default Bash behavior in
 versions through 4.2.
@@ -6116,7 +6243,7 @@ subsequently reset.
 
 @item BASH_ARGC
 An array variable whose values are the number of parameters in each
-frame of the current bash execution call stack.  The number of
+frame of the current Bash execution call stack.  The number of
 parameters to the current subroutine (shell function or script executed
 with @code{.} or @code{source}) is at the top of the stack.  When a
 subroutine is executed, the number of parameters passed is pushed onto
@@ -6128,9 +6255,10 @@ builtin).
 Setting @code{extdebug} after the shell has started to execute a script,
 or referencing this variable when @code{extdebug} is not set,
 may result in inconsistent values.
+Assignments to @env{BASH_ARGC} have no effect, and it may not be unset.
 
 @item BASH_ARGV
-An array variable containing all of the parameters in the current bash
+An array variable containing all of the parameters in the current Bash
 execution call stack.  The final parameter of the last subroutine call
 is at the top of the stack; the first parameter of the initial call is
 at the bottom.  When a subroutine is executed, the parameters supplied
@@ -6142,6 +6270,7 @@ builtin).
 Setting @code{extdebug} after the shell has started to execute a script,
 or referencing this variable when @code{extdebug} is not set,
 may result in inconsistent values.
+Assignments to @env{BASH_ARGV} have no effect, and it may not be unset.
 
 @item BASH_ARGV0
 When referenced, this variable expands to the name of the shell or shell
@@ -6206,12 +6335,21 @@ where each corresponding member of @env{FUNCNAME} was invoked.
 @code{$@{FUNCNAME[$i]@}} was called (or @code{$@{BASH_LINENO[$i-1]@}} if
 referenced within another shell function). 
 Use @code{LINENO} to obtain the current line number.
+Assignments to @env{BASH_LINENO} have no effect, and it may not be unset.
 
 @item BASH_LOADABLES_PATH
 A colon-separated list of directories in which the shell looks for
 dynamically loadable builtins specified by the
 @code{enable} command.
 
+@item BASH_MONOSECONDS
+Each time this variable is referenced, it expands to the value returned
+by the system's monotonic clock, if one is available.
+If there is no monotonic clock, this is equivalent to @env{EPOCHSECONDS}.
+If @env{BASH_MONOSECONDS}
+is unset, it loses its special properties, even if it is
+subsequently reset.
+
 @item BASH_REMATCH
 An array variable whose members are assigned by the @samp{=~} binary
 operator to the @code{[[} conditional command
@@ -6227,6 +6365,7 @@ corresponding shell function names in the @code{FUNCNAME} array
 variable are defined.
 The shell function @code{$@{FUNCNAME[$i]@}} is defined in the file
 @code{$@{BASH_SOURCE[$i]@}} and called from @code{$@{BASH_SOURCE[$i+1]@}}
+Assignments to @env{BASH_SOURCE} have no effect, and it may not be unset.
 
 @item BASH_SUBSHELL
 Incremented by one within each subshell or subshell environment when
@@ -6236,6 +6375,13 @@ If @env{BASH_SUBSHELL}
 is unset, it loses its special properties, even if it is
 subsequently reset.
 
+@item BASH_TRAPSIG
+Set to the signal number corresponding to the trap action being executed
+during its execution.
+See the description of @code{trap}
+(@pxref{Bourne Shell Builtins})
+for information about signal numbers and trap execution.
+
 @item BASH_VERSINFO
 A readonly array variable (@pxref{Arrays})
 whose members hold version information for this instance of Bash.
@@ -6464,6 +6610,38 @@ of matches.
 The pattern matching honors the setting of the @code{extglob} shell
 option.
 
+@item GLOBSORT
+Control how the results of filename expansion are sorted.
+The value of this variable specifies the sort criteria and sort order for
+the results of filename expansion.
+If this variable is unset or set to the null string, filename expansion
+uses the historial behavior of sorting by name.
+If set, a valid value begins with an optional @samp{+}, which is ignored,
+or @samp{-}, which reverses the sort order from ascending to descending,
+followed by a sort specifier.
+The valid sort specifiers are
+@samp{name},
+@samp{size},
+@samp{mtime},
+@samp{atime},
+@samp{ctime},
+and
+@samp{blocks},
+which sort the files on name, file size, modification time, access time,
+inode change time, and number of blocks, respectively.
+
+For example, a value of @code{-mtime} sorts the results in descending
+order by modification time (newest first).
+
+A sort specifier of @samp{nosort} disables sorting completely; the results
+are returned in the order they are read from the file system,.
+
+If the sort specifier is missing, it defaults to @var{name},
+so a value of @samp{+} is equivalent to the null string,
+and a value of @samp{-} sorts by name in descending order.
+
+Any invalid value restores the historical sorting behavior.
+
 @item GROUPS
 An array variable containing the list of groups of which the current    
 user is a member.
@@ -6837,8 +7015,8 @@ The CPU percentage, computed as (%U + %S) / %R.
 The optional @var{p} is a digit specifying the precision, the number of
 fractional digits after a decimal point.
 A value of 0 causes no decimal point or fraction to be output.
-At most three places after the decimal point may be specified; values
-of @var{p} greater than 3 are changed to 3.
+At most six places after the decimal point may be specified;
+values of @var{p} greater than 6 are changed to 6.
 If @var{p} is not specified, the value 3 is used. 
 
 The optional @code{l} specifies a longer format, including minutes, of
@@ -7525,6 +7703,11 @@ equal-precedence operators.
 The levels are listed in order of decreasing precedence. 
 
 @table @code
+@cindex arithmetic operators
+@cindex unary arithmetic operators
+@cindex binary arithmetic operators
+@cindex conditional arithmetic operator
+@cindex bitwise arithmetic operators
 
 @item @var{id}++ @var{id}--
 variable post-increment and post-decrement 
@@ -7571,7 +7754,7 @@ logical AND
 @item ||
 logical OR
 
-@item expr ? expr : expr
+@item expr ? if-true-expr : if-false-expr
 conditional operator
 
 @item = *= /= %= += -= <<= >>= &= ^= |=
@@ -7741,8 +7924,12 @@ the optional subscript is supplied, that index is assigned to;
 otherwise the index of the element assigned is the last index assigned
 to by the statement plus one.  Indexing starts at zero.
 
-Each @var{value} in the list undergoes all the shell expansions
-described above (@pxref{Shell Expansions}).
+Each @var{value} in the list undergoes the shell expansions
+described above (@pxref{Shell Expansions}),
+but @var{value}s that are valid variable assignments
+including the brackets and subscript do not undergo
+brace expansion and word splitting, as with individual
+variable assignments.
 
 When assigning to an associative array, the words in a compound assignment
 may be either assignment statements, for which the subscript is required,
@@ -8154,9 +8341,62 @@ such as @code{jails}, @code{zones}, or @code{containers}.
 
 
 @node Bash POSIX Mode
-@section Bash POSIX Mode
+@section Bash and POSIX
+
+@subsection What is POSIX?
+@cindex POSIX description
+
+@sc{posix} is the name for a family of standards based on Unix.
+A number of Unix services, tools, and functions are part of the standard,
+ranging from the basic system calls and C library functions to common
+applications and tools to system administration and management.
+
+The @sc{posix} Shell and Utilities standard was originally developed by
+IEEE Working Group 1003.2 (POSIX.2).
+The first edition of the 1003.2 standard was published in 1992.
+It was merged with the original IEEE 1003.1 Working Group and is
+currently maintained by the Austin Group (a joint working group of the
+IEEE, The Open Group and ISO/IEC SC22/WG15).
+Today the Shell and Utilities are a volume within the set of documents that
+make up IEEE Std 1003.1-2017, and thus the former POSIX.2 (from 1992)
+is now part of the current unified @sc{posix} standard.
+
+The Shell and Utilities volume concentrates on the command
+interpreter interface and utility programs commonly executed from
+the command line or by other programs.
+The standard is freely available on the web at
+@url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html}.
+
+Bash is concerned with the aspects of the shell's behavior defined
+by the @sc{posix} Shell and Utilities volume.  The shell command
+language has of course been standardized, including the basic flow
+control and program execution constructs, I/O redirection and
+pipelines, argument handling, variable expansion, and quoting.
+
+The @i{special} builtins, which must be implemented as part of the
+shell to provide the desired functionality, are specified as
+being part of the shell; examples of these are @code{eval} and
+@code{export}.
+Other utilities appear in the sections of POSIX not
+devoted to the shell which are commonly (and in some cases must
+be) implemented as builtin commands, such as
+@code{read} and @code{test}.
+POSIX also specifies aspects of the shell's interactive
+behavior, including job control and command
+line editing.
+Only vi-style line editing commands have been
+standardized; emacs editing commands were left out due to
+objections.
+
+@subsection Bash POSIX Mode
 @cindex POSIX Mode
 
+Although Bash is an implementation of the @sc{posix} shell
+specification, there are areas where the Bash default behavior
+differs from the specification.
+The Bash @dfn{posix mode} changes the Bash
+behavior in these areas so that it conforms to the standard more closely. 
+
 Starting Bash with the @option{--posix} command-line option or executing
 @samp{set -o posix} while Bash is running will cause Bash to conform more
 closely to the @sc{posix} standard by changing the behavior to
@@ -8496,6 +8736,22 @@ undergoes expansion.
 That means, for example, that a backslash preceding a double quote
 character will escape it and the backslash will be removed.
 
+@item
+The @code{test} builtin compares strings using the current locale when
+processing the @samp{<} and @samp{>} binary operators.
+
+@item
+The @code{test} builtin's @option{-t} unary primary requires an argument.
+Historical versions of @code{test} made the argument optional in certain
+cases, and bash attempts to accommodate those for backwards compatibility.
+
+@item
+Command substitutions don't set the @samp{?} special parameter. The exit
+status of a simple command without a command word is still the exit status
+of the last command substitution that occurred while evaluating the variable
+assignments and redirections in that command, but that does not happen until
+after all of the assignments and redirections.
+
 @end enumerate
 
 There is other @sc{posix} behavior that Bash does not implement by
@@ -8509,6 +8765,10 @@ The @code{fc} builtin checks @code{$EDITOR} as a program to edit history
 entries if @code{FCEDIT} is unset, rather than defaulting directly to
 @code{ed}.  @code{fc} uses @code{ed} if @code{EDITOR} is unset.
 
+@item
+A non-interactive shell does not exit if a variable assignment preceding
+the @code{command} builtin or another non-special builtin fails.
+
 @item
 As noted above, Bash requires the @code{xpg_echo} option to be enabled for
 the @code{echo} builtin to be fully conformant.
@@ -8588,16 +8848,6 @@ quoting the rhs of the @code{[[} command's regexp matching operator (=~)
 has no special effect
 @end itemize
 
-@item compat32
-@itemize @bullet
-@item
-interrupting a command list such as "a ; b ; c" causes the execution
-of the next command in the list (in bash-4.0 and later versions,
-the shell acts as if it received the interrupt, so
-interrupting one command in a list aborts the execution of the
-entire list)
-@end itemize
-
 @item compat40
 @itemize @bullet
 @item
@@ -9160,7 +9410,7 @@ at the Bash prompt in your Bash source directory.
 If you want to build Bash in a directory separate from the source
 directory -- to build for multiple architectures, for example --
 just use the full path to the configure script. The following commands
-will build bash in a directory under @file{/usr/local/build} from
+will build Bash in a directory under @file{/usr/local/build} from
 the source code in @file{/usr/local/src/bash-4.4}:
 
 @example
@@ -9262,7 +9512,7 @@ or by specifying a value for the @env{prefix} @samp{make}
 variable when running @samp{make install}
 (e.g., @samp{make install prefix=@var{PATH}}).
 The @env{prefix} variable provides a default for @env{exec_prefix} and
-other variables used when installing bash.
+other variables used when installing Bash.
 
 You can specify separate installation prefixes for
 architecture-specific files and architecture-independent files. 
@@ -9276,7 +9526,7 @@ you can specify these variables as arguments to @code{make}:
 @samp{make install exec_prefix=/} will install @code{bash} and
 @code{bashbug} into @file{/bin} instead of the default @file{/usr/local/bin}.
 
-If you want to see the files bash will install and where it will install
+If you want to see the files Bash will install and where it will install
 them without changing anything on your system, specify the variable
 @env{DESTDIR} as an argument to @code{make}. Its value should be the
 absolute directory path you'd like to use as the root of your sample
@@ -9431,7 +9681,7 @@ compiled, linked, and installed, rather than changing run-time features.
 
 @table @code
 @item --enable-largefile
-Enable support for @uref{http://www.unix.org/version2/whatsnew/lfs20mar.html,
+Enable support for @url{http://www.unix.org/version2/whatsnew/lfs20mar.html,
 large files} if the operating system requires special compiler options
 to build programs which can access large files.  This is enabled by
 default, if the operating system provides large file support.
@@ -9470,7 +9720,7 @@ Allow alias expansion and include the @code{alias} and @code{unalias}
 builtins (@pxref{Aliases}).
 
 @item --enable-alt-array-implementation
-This builds bash using an alternate implementation of arrays
+This builds Bash using an alternate implementation of arrays
 (@pxref{Arrays}) that provides faster access at the expense of using
 more memory (sometimes many times more, depending on how sparse an array is).
 
@@ -9520,7 +9770,7 @@ Include support for coprocesses and the @code{coproc} reserved word
 (@pxref{Pipelines}).
 
 @item --enable-debugger
-Include support for the bash debugger (distributed separately).
+Include support for the Bash debugger (distributed separately).
 
 @item --enable-dev-fd-stat-broken
 If calling @code{stat} on /dev/fd/@var{N} returns different results than
@@ -9664,7 +9914,7 @@ The latest version of Bash is always available for FTP from
 
 Once you have determined that a bug actually exists, use the
 @code{bashbug} command to submit a bug report or use the form at the
-<a href="https://savannah.gnu.org/projects/bash/">Bash project page</a>.
+@uref{https://savannah.gnu.org/projects/bash/,Bash project page}.
 If you have a fix, you are encouraged to submit that as well!
 Suggestions and `philosophical' bug reports may be mailed
 to @email{bug-bash@@gnu.org} or @email{help-bash@@gnu.org}.