-Silent11#!/usr/local/bin/perl -w use strict; my @uptime = split //, `uptime`; my ($to,$from,$subject) = ('mail@list.com','sys@admin.com','ALERT : re +boot'); if ($uptime[2] > 1 ){ open(MAIL, "|/usr/sbin/sendmail -t"); print <<MAIL; To: $to From: $from Subject: $subject Server rebooted in the last 24 hours. MAIL close(MAIL); }
In reply to Re: Email printed message
by silent11
in thread Email printed message
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |