#!/bin/bash
#
# The if command also accepts arithmetic expressions.
# (Think why.)

x=8
if (( x < 10 ))
then
     echo "x is less than 10"
fi

year=$(date +%Y)
if (( ("$year" % 400) == "0" )) || (( ("$year" % 4 == "0") && ("$year" % 100 != "0")  ))
then
     echo "This is a leap year"
else
     echo "This is not a leap year"
fi

