#!/bin/csh
#
# search mail headers for input string
set searcharg=""
if ($#argv > 0 ) set searcharg="$1"
set mail_cmdfile="$HOME/chkmail.cmds"
echo h >     $mail_cmdfile
echo exit >> $mail_cmdfile
set chkmail=`Mail < $mail_cmdfile | grep "$searcharg"`
/bin/rm -f $mail_cmdfile
echo $chkmail
