docs/read: Mention the more common mode first

Printing to stdout is a thing it can do, yes, but writing to variables
is the more typical way to use it.
This commit is contained in:
Fabian Boehm 2023-10-12 22:34:45 +02:00
parent bba0103103
commit c6e905a1b9

View file

@ -13,7 +13,7 @@ Synopsis
Description
-----------
``read`` reads from standard input and either writes the result back to standard output (for use in command substitution), or stores the result in one or more shell variables.
``read`` reads from standard input and stores the result in shell variables. In an alternative mode, it can also print to its own standard output, for example for use in command substitutions.
By default, ``read`` reads a single line and splits it into variables on spaces or tabs. Alternatively, a null character or a maximum number of characters can be used to terminate the input, and other delimiters can be given.