#!/bin/bash
#if-else conditional statements
n=100
if [ $n -eq 100 ]
then
echo "n is 100"
fi
n=99
if [ $n -eq 100 ]
then
echo "n is 100"
else
echo "n is not 100"
fi
n=99
if [ $n -eq 100 ]
then
echo "n is 100"
elif [ $n -gt 100 ]
then
echo "n is greater than 100"
else
echo "n is less than 100"
fi
n=99
if [ $n -eq 100 ]
then
echo "n is 100"
else
if [ $n -gt 100 ]
then
echo "n is greater than 100"
else
echo "n is less than 100"
fi
fi
#if-else conditional statements
n=100
if [ $n -eq 100 ]
then
echo "n is 100"
fi
n=99
if [ $n -eq 100 ]
then
echo "n is 100"
else
echo "n is not 100"
fi
n=99
if [ $n -eq 100 ]
then
echo "n is 100"
elif [ $n -gt 100 ]
then
echo "n is greater than 100"
else
echo "n is less than 100"
fi
n=99
if [ $n -eq 100 ]
then
echo "n is 100"
else
if [ $n -gt 100 ]
then
echo "n is greater than 100"
else
echo "n is less than 100"
fi
fi
Excellent article with practical information and useful travel insights. It made planning much easier and answered several common questions. Looking forward to reading more helpful content.
ReplyDeleteGoa Tour Packages for 4 Persons
Goa Packages with Flight from Delhi
Goa Tour Package from Bangalore
Goa Tour Package from Delhi