6. Implemented PC49 delete/full from outside (kill full on the inside)
[spider.git] / cmd / show / wwv.pl
1 #
2 # print out the wwv stats
3 #
4 # Copyright (c) 1998 - Dirk Koopman G1TLH
5 #
6 # $Id$
7 #
8 my $self = shift;
9
10 my $cmdline = shift;
11 my @f = split /\s+/, $cmdline;
12 my $f;
13 my @out;
14 my ($from, $to); 
15
16 $from = 0;
17 while ($f = shift @f) {                 # next field
18         #  print "f: $f list: ", join(',', @list), "\n";
19         if (!$from && !$to) {
20                 ($from, $to) = $f =~ /^(\d+)-(\d+)$/o;         # is it a from -> to count?
21                 next if $from && $to > $from;
22         }
23         if (!$to) {
24                 ($to) = $f =~ /^(\d+)$/o if !$to;              # is it a to count?
25                 next if $to;
26         }
27 }
28
29 $to = 10 if !$to;
30
31 push @out, "Date        Hour   SFI   A   K Forecast                               Logger";
32 push @out,  Geomag::print($from, $to, $main::systime);
33 return (1, @out);