Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'This seems to do it...' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
This seems to do it...
Authored by: Stephan on Mar 10, '02 03:45:23AM
Perl complained about the original script and I didn't need the mailing stuff. This script uses ' ` ' with the shell commands.
#!/usr/bin/perl
system `sh /etc/daily 2>&1 | tee /var/log/daily.out`
if !-e '/var/log/daily.out' or -M '/var/log/daily.out' > 1;
system `sh /etc/weekly 2>&1 | tee /var/log/weekly.out`
if !-e '/var/log/weekly.out' or -M '/var/log/weekly.out' > 7;
system `sh /etc/monthly 2>&1 | tee /var/log/monthly.out`
if !-e '/var/log/monthly.out' or -M '/var/log/monthly.out' > 30;


[ Reply to This | # ]
This seems to do it...
Authored by: kwalker on Mar 10, '02 10:13:21AM

If you use the backquotes (`), the "system" at the start of the line is unnecessary. It would be better to retain the "system" and use regular single quotes (').



[ Reply to This | # ]