customize cal command
I want to customize cal command so that it accepts more than one month, like $./cal.sh cal 1 3.[January,March]
I have done this for two months,but cannot generalize for more than two months, e.g. cal 1 3 4 or any number of arguments not decided beforehand.
if [ $# -gt 1 ];then
t=$( 'date' '+20%y' )
if [ $2 -ge 1 -a $2 -le 12 -a $3 -ge 1 -a $3 -le 12 ]
cal $2 $t; cal $3 $t
Thanks in advance....