mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-02 16:28:14 +02:00
additional tests; documentation updates
This commit is contained in:
+4
-4
@@ -1096,16 +1096,16 @@ select @var{name} [in @var{words} @dots{}]; do @var{commands}; done
|
||||
@end example
|
||||
|
||||
The list of words following @code{in} is expanded, generating a list
|
||||
of items. The set of expanded words is printed on the standard
|
||||
of items, and the set of expanded words is printed on the standard
|
||||
error output stream, each preceded by a number. If the
|
||||
@samp{in @var{words}} is omitted, the positional parameters are printed,
|
||||
as if @samp{in "$@@"} had been specified.
|
||||
The @env{PS3} prompt is then displayed and a line is read from the
|
||||
standard input.
|
||||
@code{select} then displays the @env{PS3}
|
||||
prompt and reads a line from the standard input.
|
||||
If the line consists of a number corresponding to one of the displayed
|
||||
words, then the value of @var{name} is set to that word.
|
||||
If the line is empty, the words and prompt are displayed again.
|
||||
If @code{EOF} is read, the @code{select} command completes.
|
||||
If @code{EOF} is read, the @code{select} command completes and returns 1.
|
||||
Any other value read causes @var{name} to be set to null.
|
||||
The line read is saved in the variable @env{REPLY}.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user