#!/bin/sh # # a menu system for basic UNIX use # disclaimer for hackers: I was only following orders; I'm # not even putting my name on this. # so=`/usr/bin/tput smso`; se=`/usr/bin/tput rmso`; cl=`/usr/bin/tput clear`; # # ignore control-Z's # trap '' 18 # # figure out (possibly generic) e-mail address # myaddr=${USER}@gauss.unh.edu # # and now on with the show # while : do echo $cl echo " " echo " Gauss Menu System" echo " " echo " Your E-mail Address:" $myaddr echo " " echo " 1 - ${so}MAIL${se} (Run pine mailer)" echo " 3 - ${so}LYNX${se} (Run lynx Web Browser)" echo " 4 - ${so}SHELL${se} (Exit to Command Shell)" echo " 5 - ${so}LOGOUT${se}" echo " 6 - ${so}PASSWORD${se} (Change password)" echo " " echo " Your choice? (1-6): \c" read ans || exit 0 case $ans in 1) echo $cl; /usr/local/bin/pine ;; 3) echo $cl; /usr/local/bin/lynx;; 4) echo $cl; echo "You can give the 'menu' command to return to the menu."; exit 0;; 5) echo $cl; pid=`ps -p $$ -o ppid|tail -1`; kill -HUP $pid; exit 0;; 6) echo $cl; /usr/bin/passwd ;; *) ;; esac done