chandra-mta / config_mon

This is the MTA dumps monitoring scripts.
1 stars 0 forks source link

sys args does not parse list of files #5

Closed william-aaron-CFA closed 10 months ago

william-aaron-CFA commented 10 months ago

In the dumps_mon_2.6.pl perl script, when arguments are passed through the command line/shell script call. is will intake either a single input .tl file (or deahk_temp_in.tmp) to parser for data or a file containing a list of .tl files. but the parsing in the event the input is a list of tiles depends on the name of the file list file containing the "@" symbol

if ($cinfile =~ /^\@/) { $cinfile = substr($cinfile, 1); print "cinfile $cinfile \n"; my @patharr = split("/", $cinfile); my $path = "";

for ($ii = 0; $ii < $#patharr; $ii++) {
$path .= "/$patharr[$ii]";
}

open CFILE, "<$cinfile";

$counter = 0;
while($ccdmfile = <CFILE>) {
    chomp $ccdmfile;
  print "ccdmfile $ccdmfile\n";
    #$ccdmfiles[$counter++] = $path . $ccdmfile;
    $ccdmfiles[$counter++] = $ccdmfile;
}
close CFILE;

} else { $ccdmfiles[0] = $cinfile; }

william-aaron-CFA commented 10 months ago

Solution. when mta_run_2.6 calling a list of strings, add the "@" symbol into the name of the sys arg if (test -s ccdmlist); then optstring="$optstring-c @ccdmlist "; fi