Acabo de lanzar una utilidad de línea de comandos, mac-wifi
, alojada en enlace , que satisface estas necesidades (al menos para mí , en este momento, siéntase libre de ofrecer sugerencias). Es una secuencia de comandos de Ruby y se puede instalar de una de estas formas:
-
gem install mac-wifi
-
curl https://raw.githubusercontent.com/keithrbennett/macwifi/master/bin/mac-wifi -o mac-wifi && chmod +x mac-wifi
Para uso interactivo (tiene un shell para mantenerlo abierto y para simplemente escribir varios comandos), deberá instalar pry
gem:
gem install pry
Aquí está su salida de ayuda:
mac-wifi version 1.1.0 -- Available commands are:
ci - connected to Internet (not just wifi on)?
co[nnect] network-name - turns wifi on, connects to network-name
cy[cle] - turns wifi off, then on, preserving network selection
d[isconnect] - disconnects from current network, does not turn off wifi
h[elp] - prints this help
i[nfo] - prints wifi-related information
lsp[referred] - lists preferred (not necessarily available) networks
lsa[vailable] - lists available networks
n[etwork_name] - name (SSID) of currently connected network
on - turns wifi on
of[f] - turns wifi off
pa[ssword] network-name - shows password for preferred network-name
q[uit] - exits this program (interactive shell mode only)
r[m] network-name - removes network-name from the preferred networks list
s[hell] - opens an interactive pry shell (command line only)
t[ill] - returns when the desired Internet connection state is true. Options:
'on'/:on or 'off'/:off
wait interval, in seconds (optional, defaults to 0.5 seconds)
w[ifion] - is the wifi on?
x[it] - exits this program (interactive shell mode only)
When in interactive shell mode:
* use quotes for string parameters such as method names.
* for pry commands, use prefix '%'.