10.0;readln, revision 1.0, 88/01/21
readln -- Set a variable equal to an input value
usage: readln [-p[rompt] prompt] [-err[in]] variable_list
DESCRIPTION
The readln command reads a line of input and sets a variable to that
value. Use the -p 'prompt' argument to instruct readln to issue a prompt.
readln accepts multiple variable names.
The variable type is always a string.
Refer to the descriptions of the read and readc commands for related
information.
Consider the following command line in a shell script:
readln -p "Enter total here: " total
In this example, readln displays the prompt "Enter total here: " in the
process input window, and assigns the value of the input line to the
variable named "total."
ARGUMENTS
variable_list (required)
Specify the name(s) of the variable(s) that receives the
input value(s). If you specify more than one variable
name (separated by blanks), readln assigns the values of
input lines to the variables in the order that the
variables were named.
OPTIONS
-p[rompt] prompt
Specify a prompt string to request the input value.
Enclose the string in single quotation marks if it
contains literal blanks.
-err[in] Read input from error input instead of standard input.
This option is useful for reading user input from the
shell's input pad (where error input is normally directed)
when the readln command appears inside a pipeline, since
standard input in that case is connected to the pipe.
EXAMPLES
Consider the following command line in a shell script:
readln -p 'Enter total here: ' total
In this example, readln displays the prompt "Enter total here: " in the
process input window, and assigns the value of the input line to the
variable named "total."
SEE ALSO
More information is available. Type
help readc For information on assigning single-character strings to
variables
help read For information on assigning multicharacter strings to
variables