I want to log alarms under 5min to a file, alarms 5 to 10 min old to another file, and alarms older then 10 min to yet another.
Here is my attempt:
print FILE1 "Alarm occurred $diff minutes ago\n" if $diff <= 4.99;
print FILE2 "Alarm occurred $diff minutes ago\n" if ($diff >= 5.00) && ($diff <=9.99) ;
print FILE3 "Alarm occurred $diff minutes ago\n" if $diff >= 10.00;
I'm only getting the lessthen 4.99 data
Start Free Trial