home *** CD-ROM | disk | FTP | other *** search
/ norge.freeshell.org (192.94.73.8) / 192.94.73.8.tar / 192.94.73.8 / pub / sdf / historical / menu2 < prev    next >
Text File  |  1995-01-27  |  6KB  |  203 lines

  1. trap '' 2
  2. echo
  3. echo "PinkBBS v0.99b"
  4. echo
  5. response='a'
  6. while [ ! $response = '!' ]
  7. do
  8.   if [ $response = 'a' -o $response = 'e' -o $response = 'foo' ]
  9.   then
  10.     echo
  11.     echo
  12.   fi
  13.   response='a'
  14.   echo
  15.   echo -n "main [?nrsfgcwplume!] "
  16.   read bar
  17.   response=$response$bar
  18.   response=`echo $response | cut -f1 -d " "`
  19.   if [ $response = 'a' ]
  20.   then
  21.     response='foo'
  22.   else
  23.     response=`echo $response | cut -c2`
  24.   fi
  25.   case $response in
  26.     '?') echo
  27.          more /usr/local/lib/menu/help;;
  28.     'n') if [ $LOGNAME = 'new' -o $LOGNAME = 'anon' ]
  29.          then
  30.            echo
  31.            echo "executing rn... please keep in mind that you're not logged"
  32.            echo "  in under your own account, and therefor you won't be able"
  33.            echo "  to receive direct response to any posted articles."
  34.          fi
  35.          echo
  36.          /usr/local/bin/rn;;
  37.     'r') if [ $LOGNAME = 'new' -o $LOGNAME = 'anon' ]
  38.          then
  39.            echo
  40.            echo "you must be logged in under your own acct to use this feature"
  41.          else
  42.            echo
  43.            /usr/bin/mailx
  44.          fi;;
  45.     's') if [ $LOGNAME = 'new' -o $LOGNAME = 'anon' ]
  46.          then
  47.            echo
  48.            echo "please keep in mind that since you're not logged-in under"
  49.            echo "your own account, you will not be able to receive any replies"
  50.            echo "to your mail."
  51.          fi
  52.          echo
  53.          echo -n "to: "
  54.          read whom
  55.          /usr/bin/mailx $whom;;
  56.     'f') cd /usr/pub
  57.          while [ ! $response = 'e' ]
  58.          do
  59.            response='a'
  60.            echo
  61.            echo -n "file [?udlrbcvze] "
  62.            read bar
  63.            response=$response$bar
  64.            if [ $response = 'a' ]
  65.            then
  66.              response='foo'
  67.            else
  68.              response=`echo $response | cut -c2`
  69.            fi
  70.            case $response in
  71.              '?') echo
  72.                   more /usr/local/lib/menu/help.file;;
  73.              'u') rz;;
  74.              'd') echo
  75.                   echo -n "file(s): "
  76.                   read bar
  77.                   sz $bar;;
  78.              'l') echo
  79.                   ls -al | more
  80.                   echo
  81.                   echo "(lines preceded with a 'd' are directories)";;
  82.              'b') echo
  83.                   ls -CF | more;;
  84.              'r') echo
  85.                   ls -CRF | more;;
  86.              'c') echo
  87.                   echo -n "to: "
  88.                   read bar
  89.                   cd $bar*;;
  90.              'v') echo
  91.                   echo -n "file(s): "
  92.                   read bar
  93.                   more $bar;;
  94.              'z') echo
  95.                   echo -n "file(s): "
  96.                   read bar
  97.                   zcat $bar | more
  98.            esac
  99.          done;; 
  100.     'g') while [ ! $response = 'e' ]
  101.          do
  102.            response='a'
  103.            echo
  104.            echo -n "game [?cgmlte] "
  105.            read bar
  106.            response=$response$bar
  107.            if [ $response = 'a' ]
  108.            then
  109.              response='foo'
  110.            else
  111.              response=`echo $response | cut -c2`
  112.            fi
  113.            case $response in
  114.              '?') echo
  115.                   more /usr/local/lib/menu/help.games;;
  116.              'c') /usr/games/gnuchess;;
  117.              'g') /usr/games/gnugo;;
  118.              'm') /usr/games/mazewar;;
  119.              'l') /usr/games/lander;;
  120.              't') echo
  121.                   echo -n "sludge factor (default: 100): "
  122.                   read bar
  123.                   /usr/games/tetrix $bar;;
  124.            esac
  125.          done;;
  126.     'w') echo
  127.          /bin/who -THu;;
  128.     'p') bar='-ft'
  129.          echo
  130.          echo -n "of which terminal(s) ('e' for everyone): "
  131.          read whom
  132.          response=$bar$whom
  133.          if [ $response = '-fte' ]
  134.          then
  135.            response='-fe'
  136.          fi
  137.          echo
  138.          ps $response;;
  139.     'l') echo
  140.          who /etc/wtmp | tail -15;;
  141.     'c') while [ ! $response = 'e' ]
  142.          do
  143.            response='a'
  144.            echo
  145.            echo -n "chat [?wpre] "
  146.            read bar
  147.            response=$response$bar
  148.            if [ $response = 'a' ]
  149.            then
  150.              response='foo'
  151.            else
  152.              response=`echo $response | cut -c2`
  153.            fi
  154.            case $response in
  155.              '?') echo
  156.                   more /usr/local/lib/menu/help.chat;;
  157.              'w') echo
  158.                   echo -n "to: "
  159.                   read whom
  160.                   write $whom;;
  161.              'p') echo
  162.                   echo -n "to: "
  163.                   read whom
  164.                   /usr/local/bin/phone $whom;;
  165.              'r') echo
  166.                   /usr/local/bin/rt;;
  167.            esac
  168.          done;;
  169.     'u') while [ ! $response = 'e' ]
  170.          do
  171.            response='a'
  172.            echo
  173.            echo -n "help [?hime] "
  174.            read bar
  175.            response=$response$bar
  176.            if [ $response = 'a' ]
  177.            then
  178.              response='foo'
  179.            else
  180.              response=`echo $response | cut -c2`
  181.            fi
  182.            case $response in
  183.              '?') echo
  184.                   more /usr/local/lib/menu/help.unix;;
  185.              'h') help;;
  186.              'i') echo
  187.                   more /usr/local/lib/menu/info;;
  188.              'm') echo
  189.                   echo -n "topic: "
  190.                   read bar
  191.                   man $bar | more;; 
  192.            esac
  193.          done;;
  194.     'm') echo
  195.          echo "please leave mail to iczer with your desired one-word login"
  196.          echo "name, and a full name.  you acct will most likely be active"
  197.          echo "in a few hours.";;
  198.     'e') kill -9 0;;
  199.   esac
  200. done
  201. echo
  202. echo "type 'menu' to return - 'help' for help on Unix"
  203.