For now i have hardcoded the script by doing
- Code: Select all
my $clidynamicage=2;
But I decided to take a look to the code, please note that i have never used perl before, but i noticed this:
- Code: Select all
sub getcliarg {
debugxoutput("--- SUB getcliarg BEGIN ---");
# Get a specific CLI argument
my $ARGvalue='X';
my $CLIarg='';
if ( @_ ) {
$CLIarg=shift;
my $i=0;
my $args='';
while ($#ARGV >= $i) {
$args = "$args $ARGV[$i]";
$i++;
}
my @CLIargARY = split(/$CLIarg/,$args);
my @CLIargARX = split(/ /,$CLIargARY[1]);
if (length($CLIargARX[0])>2) { < ------ RIGHT HERE !!!!!
$ARGvalue = $CLIargARX[0];
$ARGvalue =~ s/\/$| |\r|\n|\t//gi;
}
} else {
debugxoutput(" No CLI argument passed to find");
}
debugxoutput("--- SUB getcliarg END ---");
return $ARGvalue;
}
Beep Boop Beep....
# Vici Dynamic list
if ($args =~ /--dynamicage=/i) {
my $ARGVALtemp = getcliarg('--dynamicage=');
print ($ARGVALtemp);
if ($ARGVALtemp ne 'X') { <----- HERE IS IGNORED
$DYNAMICAGE = $ARGVALtemp;
#$clidynamicage=1;
}
}
The value of the parameter MUST BE length > 3 otherwise it will default to 'X' that means any parameter that is less than 100 days is ignored. As I mentioned, i don't really have idea what am i doing on Perl, so not sure if this maybe a solution (remember that I want to use 2 days )
- Code: Select all
BEFORE
if (length($CLIargARX[0])>2)
AFTER
if (length($CLIargARX[0])>=1)
I hope not be saying non-sense