-
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make SSID, channel and regulatory country display more robust #32
Comments
For this issue, we'll make use of iw wlan0 info | awk '/ssid/{print $2}'
iw wlan0 info | awk '/channel/{print $2}'
iw reg get | awk '/country/{print $2}' | cut -d':' -f1 |
If needed, interface name can be obtained with iw dev | awk '/^\s*Interface/{print $2}' |
Better idea for interface name: look inside directory |
This will take care of SSID with a space inside: iw wlan0 info | awk '/ssid/{$1=""; print substr($0,2)}' Edit, better yet: iw wlan0 info | grep ssid | cut -d\ -f2- |
This will print SSID with accented chars: printf $(iw wlan0 info | awk '/ssid/{$1=""; print substr($0,2)}') |
To get Wi-Fi interface name (source: https://unix.stackexchange.com/a/417845):
|
Make the display of the SSID, Wi-Fi channel and regulatory country robust, by asking directly the system (instead of reading the config files).
The text was updated successfully, but these errors were encountered: