First page Back Continue Last page Graphics
read Command
read [-r][-p xx][-a yy][-e] [zz ...]
If zz is a single variable, the whole line of input is placed there when ENTER is pressed.
If there is a second variable name, the first receives the first word and the second the rest of the line, and so on.
If there are enough variables, one word is placed into each one in sequence.
If there are not enough input words, excess variables are set to the null (also known as the empty) string, "".
If there are no variable names given, the special REPLY variable receives all the input.
The read command returns 0 in $? (the command exit status special variable) if it terminates normally with a newline (ENTER), or else $? is set to 1 if Control-D (end of file for stdin) or end-of-file (for another file) is found.