Read Command Assignment Help

Assignment Help: >> Advanced Shell Scripts - Read Command

The read Command

When writing shell programs, the user may require entering a few input/data from the keyboard and assigning it to the shell variables. The read command allow this

Syntax

read variablename

The read command waits for the user for enter a value. The shell assigns in which value to the shell variable that is specified through variable name.

Practice 1

The following program describes the usage of the read command.

# cat > read

echo "enter the name:"

read name

echo "$name Welcome to the world of Unix environment"

# sh read

enter the name Sunil

Sunil welcome to the world of Unix environment

The given program will interact with the user and get the name Sunil from the user through the keyboard and alternate the name and display the message Sunil Welcome to Unix Environment.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd