Make a Student Marksheet in Linux Shell Scripts
echo "Enter Student Number:->";
read no
echo "Enter Student Name:->";
read name
echo "Enter First Subject Marks:->";
read s1
echo "Enter Second Subject Marks:->";
read s2
echo "Enter Third Subject Marks:->";
read s3
echo "1:Display Grade";
echo "2:Display Persentage";
echo "3:Display Total";
echo "0:Exit";
while((1))
do
echo "Please Enter Above Option:->";
read c
tot=`expr $s1 + $s2 + $s3`;
per=$(echo " scale =3; $tot/3 " |bc)
a=$(echo " $tot/3 " |bc)
case $c in
1)
if test $a -ge 70
then
echo "Grade:->Distiction";
elif test $a -ge 60
then
echo "Grade:->First Class";
elif test $a -ge 50
then
echo "Grade:->Second Class";
elif test $a -ge 40
then
echo "Grade:->Pass class";
else
echo "Grade:->Fail";
fi
;;
2)echo "Persentage:->" $per
;;
3) echo "Total Is:->"$tot
;;
0) exit
;;
*) echo "Please Select Valid Option";
esac
done
Make a Student Marksheet in Linux Shell Scripts
Reviewed by Unknown
on
23:19
Rating:
No comments: