read

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

read variable

read -r variable

while read line; do echo "$line"; done