~fredg/rezo

9bcdf21b8a3885c7fcd4c78c0b48cca0404d2b30 — alienus 7 years ago 51f8d37 master
formatting output
1 files changed, 18 insertions(+), 4 deletions(-)

M rezo
M rezo => rezo +18 -4
@@ 84,16 84,30 @@ scan();


my $inet = @netlist;
sub test {
sub header {
    say "-" x72;
    say "Nb\tdB\tSSID";
    printf("%3s %-20s %6s %-4s %-40s\n",
           "Nb",
           "SSID",
           "dB",
           "abgn",
           "Desc");
    say "-" x72;
}
    
sub test {
    header();
    for my $i (0 .. ($inet - 1) ) {
        my $nb = $i +1;
        $netlist[$i][1] =~ s/~~~/ /g;
        $netlist[$i][8] = '-o-o-' unless defined($netlist[$i][8]);
        $netlist[$i][8] = 'open' unless defined($netlist[$i][8]);
#my ($nwid,$SSID,$chan,$channb,$bssid,$bssidn,$db,$agn,$desc);        
        say "$nb:\t$netlist[$i][6]\t$netlist[$i][1]\t$netlist[$i][8]";
        printf("%3s %-20s %6s %-4s %-40s\n",
               $nb,
               $netlist[$i][1],
               $netlist[$i][6],
               $netlist[$i][7],
               $netlist[$i][8]);
    }
}
test();