#!/bin/sh
# The Party Program--Invitations to friends from the "guest" file
#guestfile=/home/jody/ellie/shell/guests
guestfile=./guests
if [ ! -f "$guestfile" ]
then
echo "`basename $guestfile` non-existent"
exit 1
fi
PLACE="Sarotini's"; export PLACE
Time=`date +%H`
Time=`expr $Time + 1`
set cheese crackers shrimp drinks "hot dogs" sandwiches
for person in `cat $guestfile`
do
if [ $person = root ]
then
continue
else
# mail -v -s "Party" $person <<- FINIS
cat <<-FINIS
Hi ${person}! Please join me at $PLACE for a party!
Meet me at $Time o'clock.
I'll bring the ice cream. Would you please bring $1 and
anything else you would like to eat? Let me know if you
can make it. Hope to see you soon.
Your pal,
`
FINIS
shift
if [ $# -eq 0 ]
then
set cheese crackers shrimp drinks "hot dogs" sandwiches
fi
fi
done
echo "Bye..."
阅读(355) | 评论(0) | 转发(0) |