Leap Year Program using Shell Scripting in Linux
Finding Leap year in C program is very simple one, As same in Shell also we Implement on finding Leap year, I tried this in Ubuntu Linux. Saved with the extension of .sh, and i run this program by using sh <filename>. Lets try out and tell any query if there.
Note : Refer How To Copy The Following Code From This Site:
- Content Stoling is prevented on this site.
- So Refer this post How to Copy Text from TipsInside to copy the text from this site,
echo “LEAP OR NON LEAP YEAR ”
echo “Enter the year:”
if [ [$a%4] –eq 0 ]
echo “$a is leap year”
echo “$a is a non-leap year”
LEAP OR NON-LEAP YEAR
Enter the year: 1996
1996 is leap year
Enter the year: 2010
2010 is a non-leap year