Another 2.0 request

Peter Van Epp vanepp at sfu.ca
Fri Aug 4 17:04:39 EDT 2000


	David reminded me, I'd like to see an ra input file file: 

file:

dmz.argus.2000_08_02_06_30.gz
dmz.argus.2000_08_03_00_00.gz
dmz.argus.2000_08_03_06_30.gz
dmz.argus.2000_08_04_00_00.gz
dmz.argus.2000_08_04_06_30.gz

ra -f file -c -n

reads the input files one at a time out of file (instead of from the command 
line). I rolled a fast perl script that does this but internal would be 
better yet (more efficient):

#!/usr/bin/perl

if ($ARGV[0]) {
        open (FILES,"$ARGV[0]") || die "Couldn't open $ARGV[0]$!";
} else {
        print STDERR "usage: $0 argus_files 'argus filter expression'\n";
        exit (1);
}

while (<FILES>) {

        $start_time = "";
        $end_time = "";
        chop;
        $filename = $_;
        open(ARGUS,"ra -r $filename -c -n $ARGV[1] |")
              || die "Couldn't open $file_name $!";
        while (<ARGUS>) {
                print "$_";
        }
}




More information about the argus mailing list