HYG:
use strict;
my $result = system( "crontab -u root $root_change_file" );
if ($result >> 8 == 1) {
print "crontab failed\n";
} elsif ($result >> 8 == 0) { # I added this to get a hit for success.
print "crontab succeeded\n";
} elsif ($result & 127) {
printf "crontab died with signal %d, %s dump\n",
($result & 127), ($result & 128) ? 'with' : 'without';
} else {
printf "crontab returned value %d\n", $result >> 8;
}
That's the quick-n-dirty code. lifted--with some modification--from perldoc -f system. HTH...
Deane Rothenmaier,
Systems Architect,
Walgreens Corp.
847-914-5150
"The shortest distance between two points is under construction." -- "Big John" Howell
| [EMAIL PROTECTED]
07/19/2006 04:18 PM
|
To: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> cc: Subject: Re: "recovering crontab result" -- R'd T FM, found answer, no needie slappie... |
Hi Deane,
Would you care posting the answer please ... am very much interested how you
managed to get around it ...
Thanks in advance ...
Quoting "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>:
> "The shortest distance between two points is under construction." -- "Big
> John" Howell
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
