Hi,
Here is perl script. You will have to add just line to the script. It will be $Rem + or - time in seconds of the offset of your local timezone from GMT. For example IST is +5.30 so i will convert this to seconds and substract it from this $Rem variable.
#!/usr/bin/perl
$Epoch = time();
system("/usr/openv/netbackup/bin/admincmd/bpmedialist -mlist -l > $Epoch");
open(FILE,$Epoch) or die "Cannot open file: $!";
$Rem = $Epoch % 86400;
#$Rem = $Rem (+ or -) offset from GMT in seconds
$Start = $Epoch - $Rem;
$End = $Start + 86400;
while(){
$Line = $_;
chomp $Line;
@Array = split (/\s/,$Line);
if($Start <= $Array and $End >= $Array){
$Time = localtime($Array);
print "$Array expires today on $Time.\n";
}
}
unlink $Epoch;
Br,
Deepak.Message was edited by:
Deepak Bhalwankar