variable

Bash REPLY variable

If read is called without named variables, Bash stores the record in REPLY. The terminating delimiter is excluded.

Formal Syntax & Structure

bash syntaxbash
read -r

Return Value

behavior

If read is called without named variables, Bash stores the record in REPLY. The terminating delimiter is excluded.

Working Example

Example Snippetbash
printf '%s\n' '  hello  ' > input.txtread -r < input.txtprintf '[%s]\n' "$REPLY"
Bash Reference