Write a shell script to find whether an input year is leap year or not
clear
echo "LEAP YEAR SHELL SCRIPT"
echo -n "Enter a year:"
read year_checker
if [ `expr $year_checker % 4` -eq 0 ]
then
echo "$year_checker is a leap year"
else
echo "$year_checker is not a leap year"
fi
Comments
Leave a comment