Categories
Shell script

The read statement

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”

Leave a Reply

Your email address will not be published. Required fields are marked *