Write a shell script to enter records in a studentlist.txt file. The fields are Rollno, Name , Marks.

echo "Enter Roll number"
read rn

echo "Enter Name"
read name

echo "Enter marks"
read marks

echo "$rn  $name $marks">>studentlist.txt

echo "Do you want to view record(Y|y)"
read ch

if [ "$ch" = "Y" -o "$ch" = "y" ]
then
	cat studentlist.txt
fi

Comments

Leave a Reply

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