macOSのairport -I
をJSONで出力する
$ export SSID=`airport-json | jq -r '.SSID'`
$ airport-json -b -m | jq -C | lv
-x
:airport -Ix
の結果をJSONで出力-b
:airport -I
とairport -Ix
の両方を実行-m
: JSONのトップレベルのキーの有無を切替
$ brew install pen/tap/airport-json
$ go install github.com/pen/airport-json/cmd/airport-json@latest
airport -I
の出力で、JSONのキーとして不便そうな項目名は以下の変換をしている:
airport | airport-json |
---|---|
802.11 auth | IEEE80211Auth |
link auth | linkAuth |
op mode | opMode |