Created
November 24, 2013 23:57
-
-
Save hitode909/7634213 to your computer and use it in GitHub Desktop.
接続中のWiFiのSSIDを表示するやつ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
puts `/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I`.split(/\n/).find{|line| line =~ /\bSSID/ }.scan(/SSID: (.+)$/).flatten.first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment