First page Back Continue Last page Graphics
Screen Input: read
Pages 867 – 871 in the textbook
To read user input in a script, use the read built-in command:
read [-r][-p xx][-a yy][-e] [zz ...]
where
- xx is a prompt string for -p
- yy is an array name for -a
- zz is a list of variable names.
The -r option allows the input to contain backslashes, and -e allows vi editing of the input line.