xref: /original-bsd/local/tac/tmail.sh (revision a9c19d04)
1#! /bin/sh
2#	@(#)tmail.sh	1.2 10/17/85
3# Print out mail backwards.
4# Author: Jay Lepreau, Univ of Utah
5#
6PATH=/usr/new:/bin:/usr/bin:/usr/ucb
7case $# 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	   ;;
20esac
21exec tac '-
22From ' $file
23