X-Git-Url: http://www.dxcluster.org/gitweb/gitweb.cgi?p=spider.git;a=blobdiff_plain;f=cmd%2Fshow%2Fbands.pl;h=5e71ec0f999b345371ad717940f2c68cf07e452b;hp=158238f3d13c3dbd01b6f5433a8873ab5d1ee94c;hb=3d29b1a4d4aab997da2deff10470068601744530;hpb=07e07de14eea115273999b9706b591b586e88479 diff --git a/cmd/show/bands.pl b/cmd/show/bands.pl index 158238f3..5e71ec0f 100644 --- a/cmd/show/bands.pl +++ b/cmd/show/bands.pl @@ -9,15 +9,21 @@ my @f = split /\s+/, $line; my @bands; my $band; my @out; +my $i; if (!$line) { @bands = sort { Bands::get($a)->band->[0] <=> Bands::get($b)->band->[0] } Bands::get_keys(); push @out, "Bands Available:-"; foreach $band (@bands) { my $ref = Bands::get($band)->band; - my $from = $ref->[0]; - my $to = $ref->[1]; - push @out, sprintf "%10s: %d -> %d", $band, $from, $to; + my $s = sprintf "%10s: ", $band; + for ($i = 0; $i < $#{$ref}; $i += 2) { + my $from = $ref->[$i]; + my $to = $ref->[$i+1]; + $s .= ", " if $i; + $s .= "$from -> $to"; + } + push @out, $s; } push @out, "Regions Available:-"; @bands = Bands::get_region_keys();