#!/bin/bash # # Shell Scripting Tutorial 1.05r3 # # Written by Vivek G. Gite # year=0 echo -n "Enter the year, I will tell you whether its Leap year or Not? " read year ans=$(($year % 4)) # or try ans=`expr $year % 2` if [ $ans -eq 0 ]; then echo "$year is Leap Year" else echo "$year is NOT Leap Year" fi # # ./ch.sh: vivek-tech.com to nixcraft.com referance converted using this tool # See the tool at http://www.nixcraft.com/uniqlinuxfeatures/tools/ #