Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 5/3/83; site cbosgd.UUCP Path: utzoo!linus!decvax!harpo!eagle!mhuxl!houxm!ihnp4!cbosgd!dan@netword.UUCP From: dan@netword.UUCP Newsgroups: net.mail Subject: usmail shell script Message-ID: <714@cbosgd.UUCP> Date: Tue, 6-Dec-83 20:18:38 EST Article-I.D.: cbosgd.714 Posted: Tue Dec 6 20:18:38 1983 Date-Received: Fri, 9-Dec-83 03:16:23 EST Sender: mark@cbosgd.UUCP Organization: AT&T Bell Laboratories, Columbus Lines: 86 >From spotter Wed Nov 30 19:13:38 1983 To: netword!dans Subject: usmail "script" I thought that you might want to have/distribute this script - it should be fairly obvious what it does. If you have any questions just mail or give me a call. Steve Potter (503) 627-4084 CSnet: spotter@tek ARPAnet: spotter.tek@rand-relay uucp: {ucbvax,decvax,chico,pur-ee,cbosg,ihnss}!teklabs!tekcad!spotter ============= /usr/public/usmail ============= #! /bin/csh -f set CHMOD = /bin/chmod set CP = /bin/cp set MAILER = /usr/ucb/mail set RM = /bin/rm set VI = /usr/ucb/vi set FILE = /tmp/usmail$$ if (-r ~/.usmform) then $CP ~/.usmform $FILE else $CP /usr/public/lib/.usmform $FILE endif $CHMOD 600 $FILE if ($?EDITOR == 0) set EDITOR = $VI # If user's editor is vi, we can set the wrap-margin. # Otherwise, user will have to watch the margins him/herself. set ed = $EDITOR set ed = $ed:t if ($ed != vi) then $EDITOR $FILE else $EDITOR "+:set wm=15 | 2" $FILE endif unset ed echo "" echo -n "Ok to mail [yn]? " set reply = $< if (($reply != 'n') && ($reply != 'N')) then # probably should post-process out lines > 65 for non-vi users $MAILER netword\!ecom $USER < $FILE else echo "" echo -n "Save it [yn]? " set reply = $< if (($reply != 'n') && ($reply != 'N')) then echo "" echo -n "What file? " set save_file = $< $CP $FILE $save_file endif endif $RM $FILE ============= /usr/public/lib/.usmform ============= rlgvax!allegra!tektronix!tekcad!USERNAME FROM NAME(30) FROM ORGANIZATION(30) FROM STREET(30) FROM CITY,STATE(20) FROM ZIP(10) TO NAME(30) TO ORGANIZATION(30) TO STREET(30) TO CITY,STATE(20) TO ZIP(10) TEXT(65) ============= end =============