read [-options] [variable…] read val
Options #
Option | Description |
---|---|
-a array | Assign the input to array, starting with index zero. |
-d delimiter | The first character in the string delimiter is used to |
indicate the end of input, rather than a newline character. | |
-e | Use Readline to handle input. This permits input editing |
in the same manner as the command line. | |
-i string | Use string as default reply if the user simply presses. |
Requires the -e option. | |
-n num | Read num characters of input, rather than an entire line. |
-p prompt | Display a prompt for input using the string prompt. |
-r | Raw mode. Do not interpret backslash characters as escapes. |
-s | Silent mode. Do not echo characters to the display as they |
are typed. This is useful when inputting passwords. | |
-t seconds | Timeout. Terminate input after seconds. Returns a |
non-zero exit status in case of timeout. | |
-u fd | Use input from the file descriptor fd, rather than |
standard input. |
read Options