Write a shell script, which receives any year from the keyboard and determines whether the year is a leap year or not. If no argument is supplied the current year should be assumed.
echo "Enter Year"
read yr
if [ -s $yr ]
then
yr=`date +%Y`
fi
if [ `expr $yr % 4` -eq 0 -a \( `expr $yr % 400` -eq 0 -o `expr $yr % 100` -ne 0 \) ]
then
echo "Entered year is leap year"
else
echo "Entered year is not a leap year"
fi