Commit Diff
Diff:
51f8d37a9c2a22932ddeeb3a84afdeb6acb703f0
9bcdf21b8a3885c7fcd4c78c0b48cca0404d2b30
Commit:
9bcdf21b8a3885c7fcd4c78c0b48cca0404d2b30 (master)
Tree:
b7235ddbe451e97827a4c39a29f6950bb0123024
Author:
alienus <alienusATcahouetDOTnet>
Committer:
alienus <alienusATcahouetDOTnet>
Date:
Wed Apr 22 17:45:28 2015 UTC
Message:
formatting output
blob - 3714fa724b3544972270f17d06670bdc903d76e4
blob + 43954423cdf5efcf0ee82f2c194462fc61ba8991
--- rezo
+++ rezo
@@ -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();
Frédéric Galusik