Write a shell script which takes following details of two students and prints them: Name Rollno Class Branch Batch City Cgpa

 

Write a shell script which takes following details of two students and prints them:

          Name

 Rollno

 Class

 Branch

 Batch

City

 Cgpa



Program :-



echo "utsav gohel - 91900104011"

echo "enter details for student A :-"

echo -n " Enter Your Name :-  "

read Name

 

echo -n " Enter Your Rollno :-  "

read Rollno

 

echo -n " Enter Your Class :-  "

read Class

 

echo -n " Enter Your Branch :-  "

read Branch

 

echo -n " Enter Your Batch :-  "

read Batch

 

echo -n " Enter Your City :-  "

read City

 

echo -n " Enter Your Cgpa :-  "

read Cgpa

 

echo "enter details for student B :-"

 

echo -n " Enter Your Name :-  "

read BName

 

echo -n " Enter Your Rollno :-  "

read BRollno

 

echo -n " Enter Your Class :-  "

read BClass

 

echo -n " Enter Your Branch :-  "

read BBranch

 

echo -n " Enter Your Batch :-  "

read BBatch

 

echo -n " Enter Your City :-  "

read BCity

 

echo -n " Enter Your Cgpa :-  "

read BCgpa

 

echo  " Name $Name "

echo  " Rollno $Rollno "

echo "Class $Class "

echo  "Branch $Branch"

echo "Batch $Batch"

echo "City $City"

echo " Cgpa $Cgpa"

 

echo  " Name $BName "

echo  " Rollno $BRollno "

echo "Class $BClass "

echo  "Branch $BBranch"

echo "Batch $BBatch"

 

echo "City $BCity"

echo " Cgpa $BCgpa"



 

Output :