Answers for "else if statement bash syntax"

26

else if statement bash syntax

#!/bin/bash
 
read -p "Enter your marks: " marks
 
if [ $marks -ge 80 ]
then
    echo "Very Good"
 
elif [ $marks -ge 50 ]
then
    echo "Good"
 
elif [ $marks -ge 33 ]
then
    echo "Just Satisfactory"
else
    echo "Not OK"
fi
Posted by: Guest on March-29-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language