Reference: read
Author: Daniel Gilly & the Staff of O'Reilly & Associates
Date: 1998-08-06T21:58:53Z

#

| Chapter 4 The Bourne Shell and Korn Shell |

## read

    read [options] [variable1?string] [variable2 ...]

Korn shell only. Same as in the Bourne shell, except that the Korn shell version supports the options below as well as the ? syntax for prompting. If a variable is followed by ?`string`, then `string` is displayed as a user prompt. If no variables are given, input is stored in the REPLY variable.

### Options

-p

  Read from the output of a |& coprocess.

-r

  Raw mode; ignore \ as a line continuation character.

-s

  Save input as a command in the history file.

-u[`n`]

  Read input from file descriptor `n` (default is 0).

### Example

Prompt yourself to enter two temperatures:

>     $ read n1?"High low: " n2
>     High low: 65 33

Reference: read |  | Reference: readonly