Shell Script: Check Leap Year

Objective: Use a shell script to read a year and check whether it is a leap year or not.

A leap year comes every 4 years. But it is not a leap year if it is divisible by 100 and not by 400. So, 1700, 1800, 1900, 2100, and 2200 are not leap years. But 1600, 2000, and 2400 are leap years.

Below is simple bash shell script that can be used to determine if a given year is a leap year or not.

ibrahim = { interested_in(unix, linux, android, open_source, reverse_engineering); coding(c, shell, php, python, java, javascript, nodejs, react); plays_on(xbox, ps4); linux_desktop_user(true); }