home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 2 / 2778 / tmail.sh < prev   
Encoding:
Linux/UNIX/POSIX Shell Script  |  1991-02-18  |  402 b   |  23 lines

  1. #! /bin/sh
  2. #    @(#)tmail.sh    1.2 10/17/85
  3. # Print out mail backwards.
  4. # Author: Jay Lepreau, Univ of Utah
  5. #
  6. PATH=/usr/new:/bin:/usr/bin:/usr/ucb
  7. case $# in
  8.     0) file=/usr/spool/mail/$USER
  9.        ;;
  10.     1) if [ -r /usr/spool/mail/$1 ]
  11.        then
  12.         file=/usr/spool/mail/$1
  13.        else
  14.            file=$1
  15.        fi
  16.        ;;
  17.     *) echo "Usage: `basename $0` [ username ] [ mboxfile ]"
  18.        exit 1
  19.        ;;
  20. esac    
  21. exec tac '-
  22. From ' $file
  23.