Полезная информация

UNIX in a Nutshell: System V Edition

UNIX in a Nutshell: System V EditionSearch this book
Previous: Reference: readChapter 4
The Bourne Shell and Korn Shell
Next: Reference: readonly


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.



Read from the output of a |& coprocess.


Raw mode; ignore \ as a line continuation character.


Save input as a command in the history file.


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


Prompt yourself to enter two temperatures:

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

Previous: Reference: readUNIX in a Nutshell: System V EditionNext: Reference: readonly
Reference: readBook IndexReference: readonly

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System