Display the Calendar [Shell Program]



clear





echo " Enter the
Year: \c"


read year


echo " Enter the
Month: \c"


read month


m=0


case "$month" in


1|jan) m=1;;


2|feb) m=2;;


3|mar) m=3;;


4|apr) m=4;;


5|may) m=5;;


6|jun) m=6;;


7|jul) m=7;;


8|aug) m=8;;


9|sep) m=9;;


10|oct) m=10;;


11|nov) m=11;;


12|dec) m=12;;


*) echo $month  "is not a valid Month! Showing
Calendar for "
$year ;;





esac





if [ $m -ne 0 ]


then


cal $m $year


else


cal $year


fi











Comments

Popular posts from this blog

Write a Program to Add two 3x3 Matrix using C

C program for Unit Conversion

Write a Program to Add two 5x5 Matrix using C