To read information into one or more shell variables.
|
---|
Raw read. Don't interpret backslash at end-of-line as meaning
line
continuation.
|
---|
Lines are read from standard input and split as via shell field
splitting
(using $IFS). The first word is assigned to the first variable,
the second to
the second, and so on. If there are more words than variables,
all the
trailing words are assigned to the last variable. read exits
with a failure
value upon encountering end-of-file.
|
---|
If an input line ends with a backslash, read discards the
backslash and
newline, and continues reading data from the next line. The -r
option forces
read to treat a final backslash literally.
|
---|
When read is used in a pipeline, many shells execute it in a
separate
process. In this case, any variables set by read do not retain
their values
in the parent shell. This is also true for loops in the middle
of pipelines.
|
---|