you could use 'grep -v' to strip out the cruft.
I used copy/paste on the Command Prompt into a file I named
bssTableDetails.txt
then this command did the job for me:
grep -v -e '^[[:space:]]*$' -e '^#' bssTableDetails.txt | grep -v "indicates channel selected due to unsupported configured channel" | grep -v "indicates Local Spectrum Override in effect" | grep -v "T-Tunnel, S-Split, D-Decrypt Tunnel, B-Bridge" | grep -v "U-UAC, A-AAC, sU-Standby UAC, sA-Standby AAC" | grep -v "Aruba AP BSS Table" | grep -v "ch/EIRP/max" | grep -v "\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-" | grep -v "Num APs\:" | grep -v "Num Associations\:" | grep -v "Flags\: " > stripped_bssTableDetails.txt
putting the output into
stripped_bssTableDetails.txt The hardest part was dealing with blank lines because of the stupid windows line endings, which is what the
grep -v -e '^[[:space:]]*$' -e '^#'
is for. If you are doing it all on unix/mac, then a simple
grep -v '^$'
should do the trick.
------------------------------
Cathy Fasano
------------------------------
Original Message:
Sent: Apr 29, 2022 04:59 PM
From: Adam Forsyth
Subject: gathering e911 data
I'm working on implementation of a new voip phone system. I need to make a list of bssid's and their location as one way that the system would be able to know a user's location so it could provide that to dispatchers if the user called 911.
If I log into a controller, and issue the "show ap bss-table details" it makes me a list that at least contains bssid and the controller name. That seems like a good place to start, but it has this annoying "feature" of splitting all of the output into pages and adding collumn headers dispersed throughout.
If I first issue the "no paging" command it doesn't pause for every page, but it still puts all that junk in there and that makes it hard to parse automatically.
Is there a way to do this that i'm missing? I'd be happy if it came out csv, or i'm also happy with the way it does it with spaces or tabs added to make the collumns show up even. It's the collum headers, and periodic addition of 'Channel followed by "*" indicates channel selected due to unsupported configured channel. "Spectrum" followed by "^" indicates Local Spectrum Override in effect.' that is driving me crazy.
------------------------------
Adam Forsyth
------------------------------