Read a line of input.

Synopsis

read [OPTION]... [NAME...]

Description

Read a line from standard input and split it into fields, assigning each field to the corresponding NAME variable. Runs in the just-bash WASM shell inside SLICC.

Options

-p PROMPT Display PROMPT before reading.

-r Do not allow backslashes to escape characters.

-s Silent mode (do not echo input).

Examples

$ echo "hello world" | read a b; echo "$a $b"

Split input into two variables.

Notes

In SLICC's shell, interactive prompting may not work as expected. Best used with piped input.

See Also

echo, cat