May 2018
Beginner
332 pages
7h 28m
English
The read command is a built-in shell command for reading data from a file or keyboard.
The read command receives the input from the keyboard or a file until it receives a newline character. Then, it converts the newline character into a null character:
read variable
echo $variable
This will receive text from the keyboard. The received text will be stored in the variable.
#!/bin/bash # following line will print "Enter value: " and then read data # The received text will be stored ...