#! / bin / tcsh -f
# Gnu tc shell
# The party program - invitations to friends from the "guest" File
Set guestfile = ./guests # ~ / shell / guests
IF (! -e "$ guestfile") THEN
Echo "$ GUESTFILE: T NON-EXISTENT"
EXIT 1
ENDIF
Stenv Place "Sarotini's"
@ Time = `Date % h` 1
Set food = (Cheese Crackers Shrimp Drinks "Hot Dogs" SANDWICHES)
Foreach Person (`Cat $ GuestFILE`)
IF ($ Person = ~ root) Continue
# Start of Here Document
Mail -v -s "party" $ PERSON << 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 $ food [1] and
Anything else you 10th Like to Eat? Let me know if you can't
Make it. Hope to see you soon.
Your Pal,
Ellie @ `Hostname` # or` uname -n`
Finis
SHIFT FOOD
IF ($ # food == 0) THEN
Set food = (Cheese Crackers Shrimp Drinks "Hot Dogs"
SANDWICHES)
ENDIF
end
echo "Bye ..."