Well just added some code without giving too much thought and it worked great:
tc@box:~$ diff /usr/local/bin/wifi.sh wifi.sh
--- /usr/local/bin/wifi.sh
+++ wifi.sh
@@ -173,6 +173,9 @@
{
if ($1 ~ /Cell/)
if ( i == 0 || sid[i] != "" ) i++
+ if ($1 ~ /Address/) {
+ macap[i] = $2$3$4$5$6$7
+ }
if ($1 ~ /Frequency/) {
split($2,c," ")
chan[i] = c[4]
@@ -223,10 +226,10 @@
rsort(qual,sid,enc,chan,type, NR)
system ("busybox clear")
printf "\n%s\n\n", title
- printf " %-20s\t%5s\t%s\t%s\t%s\t%s\n", "ESSID", "Enc", "Qual", "Channel Type"
+ printf " %-20s\t%5s\t%s\t%s\t%s\t%s\t%20s\n", "ESSID", "Enc", "Qual", "Channel Type", "MAC Address"
for (l=1; l<15; l++) {
++j
- if ( j <= i ) printf "%2d. %-20s\t %4s\t %2d\t %2d\t%s\n", j, sid[j], enc[j], qual[j], chan[j], type[j]
+ if ( j <= i ) printf "%2d. %-20s\t %4s\t %2d\t %2d\t%s\t%-20s\n", j, sid[j], enc[j], qual[j], chan[j], type[j], macap[j]
}
printf "\nEnter selection ( 1 - %s ) or (q)uit", i
if ( i > 15 ) printf ", (n)ext, (p)revious: "