[Beds] Meeting and script challenge

Lee Larcombe lee at larcombe.uk-internet.org.uk
Tue Jan 11 21:45:31 GMT 2005


Hi Neil

I will be coming to the meeting on thurs. I have also done you a script 
for your challenge in perl below.
It just need to be run as a daily cron.

Regards

Lee

=================================================

#!/usr/bin/perl -w

$currentdate = `date`;

@datearray = split(/ /, $currentdate);

if ($datearray[2] eq '') {
	$date = $datearray[3]
} else {
	$date = $datearray[2]
}

if ($datearray[0] eq "Thu") {
	if ($date < 8) {
		$meetingdate = ($date + 7);

open(MESSAGE, "| /usr/lib/sendmail -oi -n -t");

print MESSAGE <<MESSAGE_BLOCK;
To:beds\@mailman.lug.org.uk
From:beds\@mailman.lug.org.uk
Subject: Next Lug Meeting

Dear all:

This is the automated reminder from Beds LUG. The next meeting will be
in a week's time on the $meetingdate th at the Pilgrim's Progress pub.

Hope to see you there.

Beds LUG.

MESSAGE_BLOCK

close MESSAGE;
	
	}
}




More information about the Beds mailing list