home *** CD-ROM | disk | FTP | other *** search
/ SGI Hot Mix 12 / Silicon_Graphics_Developer_Magic_Soft_Dev_812-8101-012.iso / .all / httpd_ncsa / cgi-bin / calendar < prev    next >
Encoding:
Text File  |  1995-11-10  |  478 b   |  31 lines

  1. #!/bin/sh
  2.  
  3. CAL=/bin/cal
  4.  
  5. echo Content-type: text/html
  6. echo
  7.  
  8. if [ -x $CAL ]; then
  9.     if [ $# = 0 ]; then
  10.         cat << EOM
  11. <HTML><HEAD><TITLE>Calendar</TITLE></HEAD><BODY>
  12. <H1>Calendar</H1>
  13.  
  14. <ISINDEX>
  15.  
  16. To look up a calendar month, type the month followed by a space then the year.<P>
  17. Example: <code>3 1993</code> would give the calendar for March 1993.
  18.  
  19. EOM
  20.     else 
  21.         echo \<PRE\>
  22.         $CAL $*
  23.         echo \</PRE\>
  24.     fi
  25. else
  26.     echo Cannot find cal on this system.
  27. fi
  28. cat << EOM
  29. </BODY></HTML>
  30. EOM
  31.