Write a Shell script that accept the month number and display number of days in that month.
echo -n "Enter month number :"
read m
case $m in
[13578] | 1[02])
echo "Number of days in $m month are 31";;
2) echo "Enter year"
read yr
if [ `expr $yr % 4` -eq 0 ]
then
echo "Number of days in $m month are 29"
else
echo "Number of days in $m month are 28"
fi;;
[469] | 11)
echo "Number of days in $m are 30";;
*) echo "Invalid month number !!!"
esac
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Monday, January 19, 2009
Program in UNIX to display number of days in that month
Posted by ars at 5:16 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment