read Command Examples

Shell builtin for retrieving data from stdin. More information: https://manned.org/read.1p.

read {{variable}}

read -a {{array}}

read -n {{character_count}} {{variable}}

read {{_ variable1 _ variable2}} <<< {{"The surname is Bond"}}

read -r {{variable}}

read -p "{{Enter your input here: }}" {{variable}}

read -s {{variable}}

while read line; do {{echo|ls|rm|...}} "$line"; done < {{/dev/stdin|path/to/file|...}}