Use to get input (data from user) from keyboard and store (data) to variable.
Syntax:
read variable1, variable2,…variableN
eg:
#!/bin/sh
echo “Enter your name please”
read fname
echo “Welcome $fname”
Use to get input (data from user) from keyboard and store (data) to variable.
Syntax:
read variable1, variable2,…variableN
eg:
#!/bin/sh
echo “Enter your name please”
read fname
echo “Welcome $fname”
One reply on “The read statement”
This is used in direct access files only. This is another branching option with the READ statement.