Index: /trunk/BNC/scripts/sot.pl
===================================================================
--- /trunk/BNC/scripts/sot.pl	(revision 9678)
+++ /trunk/BNC/scripts/sot.pl	(revision 9679)
@@ -2,7 +2,7 @@
 
 #
-# sot.pl - parse BNC logfile and create *.sot files that contain the observation types for each GNSS in RINEX header format
+# sot.pl - parse BNC logfile(s) and create *.sot files that contain the observation types for each GNSS in RINEX header format
 #
-# Revision: $Header:$
+# Revision: $Header$
 #
 
@@ -19,34 +19,43 @@
 $opts{h} && HELP_MESSAGE();
 my $caster = $opts{n} ? $opts{n} : "";
-
-my $logFil = $ARGV[0];
-if ( !$logFil ) {
+if ( scalar @ARGV < 1 ) {
     warn "usage error: no BNC logfile given\n";
     HELP_MESSAGE();
 }
+my @logFiles = @ARGV;
 
 my %obsTyps_of;
-open ( my $inp, '<', $logFil ) || die ("could not open file '$logFil': $!");
-while (<$inp>) {
-    if ( $_ =~ /Observation Types:/ ) {  # 16-03-21 10:25:38 MARS0: Observation Types: R     6   C1C L1C S1C C2P L2P S2P
-        chomp;
-        my @fields = split ( /\s+/, $_ );
-        my $mp     = $fields[2];
-        $mp =~ s/:$//;
-        my $satSys  = $fields[5];
-        my @obsTyps = @fields[ 7 .. $#fields ];
-        $obsTyps_of{$mp}->{$satSys} = \@obsTyps;
 
-        # Check obs types
-        if ( $satSys eq "G" ) {          # GPS see #65
-            foreach my $otp (@obsTyps) {
-                if ( $otp eq "L2P" || $otp eq "C2P" ) {
-                    warn ("$_: Observation Types 'L2P' and/or 'C2P' are not reasonable for GPS\n");
+# Parse each logfile
+foreach my $logfile (@logFiles) {
+    my $inp;
+    if ( !open ( $inp, '<', $logfile ) ) {
+        warn "could not open file '$logfile': $!";
+        next;
+    }
+    while (<$inp>) {
+
+        # # 16-03-21 10:25:38 MARS0: Observation Types: R     6   C1C L1C S1C C2P L2P S2P
+        if ( $_ =~ /Observation Types:/ ) {
+            chomp;
+            my @fields = split ( /\s+/, $_ );
+            my $mp     = $fields[2];
+            $mp =~ s/:$//;
+            my $satSys  = $fields[5];
+            my @obsTyps = @fields[ 7 .. $#fields ];
+            $obsTyps_of{$mp}->{$satSys} = \@obsTyps;
+
+            # Check obs types
+            if ( $satSys eq "G" ) {                     # GPS see #65
+                foreach my $otp (@obsTyps) {
+                    if ( $otp eq "L2P" || $otp eq "C2P" ) {
+                        warn ("$_: Observation Types 'L2P' and/or 'C2P' are not reasonable for GPS\n");
+                    }
                 }
             }
         }
     }
+    close ($inp);
 }
-close ($inp);
 
 # Write .sot files
@@ -104,8 +113,8 @@
 sub HELP_MESSAGE {
     print <<EOI_HILFE;
-$prog - parse observation types from BNC's logfile and write them as *.sot files
+$prog - parse observation types from BNC's logfile(s) and write them as *.sot files
 
 USAGE:
-  $prog [OPTIONS] <bnc-logfil>
+  $prog [OPTIONS] <bnc-logfiles>
 
 OPTIONS:
@@ -114,5 +123,5 @@
 
 EXAMPLES:
-   $prog -n euref-ip.net /home/user/log/scanRTCM_EUREF-IP.log
+   $prog -n euref-ip.net /home/user/log/bnc*.log
 
 EOI_HILFE
