Voir les archives!
#!/usr/bin/perl -w
use strict;
my $server=$ARGV[0];
my $command=’bpimmedia -client ‘. $server .’ -rl 24|awk \’/IMAGE/ {print $4;}\”
;
open(BACKUPIDS, “$command|”);
my $backupid;
while (<BACKUPIDS>)
{
$backupid=$_;
chomp($backupid);
$command=’bpimagelist -backupid ‘ . $backupid . ‘ -U’;
open(TIMES, “$command|”);
$command=’bpimagelist -backupid ‘ . $backupid . ‘|awk \’/IMAGE/ {print $
6,”#”;}\”;
open(BACKUPID, “$command|”);
$command=’bpimagelist -backupid ‘ . $backupid . ‘|awk \’/FRAG/ {print $9
;}\’|sort|uniq’;
open(MEDIA, “$command|”);
}
#now we fix it up
my $backuptime;
while(<TIMES>)
{
if (index($_,”INFINITY”) > 0) {
print substr($_,1,15) . “#”;
}
}
while(<BACKUPID>)
{
chomp($_);
print $_;
}
while(<MEDIA>)
{
chomp($_);
print $_ . “;”;
}
print “\n”;