Skip to content
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

Prefer networksetup and skip root runs #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

gileswells
Copy link

Primarily I wanted to incorporate @amartignoni's simplification through networksetup over use of a private API and implement a fix for issue #28 so that I had a one stop branch that would do what I needed.

This covers both scenarios.

Closes #29

@smilinggoat
Copy link

Turns out this breaks support for SSIDs with spaces in the name. It only matches the final " lastword".

@KuuDS
Copy link

KuuDS commented Apr 8, 2024

fix for SSIDs with spaces

networksetup -listallhardwareports | awk '/Wi-Fi/{getline; print $2}' | xargs networksetup -getairportnetwork | sed 's/[^:]*: //'

@smilinggoat
Copy link

fix for SSIDs with spaces

networksetup -listallhardwareports | awk '/Wi-Fi/{getline; print $2}' | xargs networksetup -getairportnetwork | sed 's/[^:]*: //'

That worked for me. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants