read
Shell builtin for retrieving data from stdin. tldr-pages
On several platforms
Several platforms
Store data that you type from the keyboard to one or more variable
read variable1 variable2 ...IdentifyStore each of the next lines you enter as values of an array
read -a arrayIdentifySpecify the number of maximum characters to be read
read -n character_count variableIdentifyAssign multiple values to multiple variables
read <<<"The surname is Bond" _ variable1 _ variable2IdentifyDo not let backslash (\) act as an escape character
read -r variableIdentifyDisplay a prompt before the input
read -p "Enter your input here: " variableIdentifyDo not echo typed characters (silent mode)
read -s variableIdentifyPerform an action on each line of a command's output
command | while IFS= read -r line; do echo "$line"; doneIdentify