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 to androidjago Cancel reply

Your email address will not be published.