2 # cal: a nicer interface to the unix cal program.
10 0) set $(our_date); m=$2; y=$4 ;; # no arguments; use today
11 1) m=$1; set $(our_date); y=$4 ;; # 1 argument; use this year
12 *) m=$1; y=$2 ;; # 2 arguments; month and year
15 echo would run, after first case: "/usr/bin/cal $m $y"
18 jan*|Jan*|JAN*) m=1 ;;
19 feb*|Feb*|FEB*) m=2 ;;
20 mar*|Mar*|MAR*) m=3 ;;
21 apr*|Apr*|APR*) m=4 ;;
22 may*|May*|MAY*) m=5 ;;
23 jun*|Jun*|JUN*) m=6 ;;
24 jul*|Jul*|JUL*) m=7 ;;
25 aug*|Aug*|AUG*) m=8 ;;
26 sep*|Sep*|SEP*) m=9 ;;
27 oct*|Oct*|OCT*) m=10 ;;
28 nov*|Nov*|NOV*) m=11 ;;
29 dec*|Dec*|DEC*) m=12 ;;
30 [1-9]|10|11|12) ;; # numeric month
31 *) y=$m; m="" ;; # just a year
34 echo running: "/usr/bin/cal $m $y"
35 /usr/bin/cal $m $y # run the real one