background img
banner
Sep 26, 2011
319 Views
0 0

The read statement

Written by
banner

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”

Article Categories:
Shell script
banner

Comments to The read statement

  • This is used in direct access files only. This is another branching option with the READ statement.

    androidjago July 13, 2015 5:19 pm Reply

Leave a Comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.