$ curl cheat.sh/
 cheat.sheets:read 
# read (The Bash Built-in)
# Read a line from the standard input and split it into fields

# Standard approach to prompting the user for a single-character response, such
# as a simple 'Y' or 'N' response. Using Bash's `read`, you can save time and
# lines by having the prompt taken care of by `read` itself.
#
# The use of the `-e` flag tells read to return a new line afterwards. As the
# `help read` output says:
#
#   use Readline to obtain the line in an interactive shell
#
# Because we're using the `-n 1` flag and argument, we'll want `-e`, as the
# user will not get a chance to press the Enter or Return key which would
# otherwise give us that new line.
read -n 1 -e -p 'Prompt: '

# A while read loop in Bash is easily one of the best features, when properly
# utilized; it often makes the use of tools like grep(1), sed(1), and even
# awk(1) redundant, depending on the functionality required. This can offer
# more efficiency, depending on what's needed and the amount of data to parse.
#
# In this example, the [I]nput [F]ield [S]eperator is set to `=` for only the
# `read` built-in, and the `-a` flag is used to split the input, per the
# provided IFS, into an array. This then means the first index is the key and
# the second index the value, which is ideal when parsing configuration files.
while IFS='=' read -a Line; do
	COMMANDS
done < INPUT_FILE

 tldr:read 
# read
# BASH builtin for retrieving data from standard input.
# More information: <https://manned.org/read.1p>.

# Store data that you type from the keyboard:
read variable

# Store each of the next lines you enter as values of an array:
read -a array

# Specify the number of maximum characters to be read:
read -n character_count variable

# Use a specific character as a delimiter instead of a new line:
read -d new_delimiter variable

# Do not let backslash (\\) act as an escape character:
read -r variable

# Display a prompt before the input:
read -p "Enter your input here: " variable

# Do not echo typed characters (silent mode):
read -s variable

# Read `stdin` and perform an action on every line:
while read line; do echo "$line"; done

$
Follow @igor_chubin cheat.sh