home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
ELM23-2
/
ELM23-2.ZIP
/
utils
/
messages
< prev
next >
Wrap
Text File
|
1992-03-20
|
550b
|
31 lines
: Use /bin/sh
# messages: part of the Elm mail system
# @(#)$Id: messages,v 4.1 90/04/28 22:44:45 syd Exp $
if [ "$2" != "" ]; then
echo Usage: messages \{folder-name\} 1>&2
exit 1
fi
if [ "$1" = "" ]; then
fname=$MAIL
optional="in your mailbox"
else
fname=$1
optional="in folder $1"
fi
if [ -f "$fname" ]; then
mcount=`egrep -c "^From " $fname`
else
exit 0
fi
if [ "$mcount" -eq 1 ]; then
echo There is $mcount message $optional.
else
echo There are $mcount messages $optional.
fi
exit $mcount