shell command to identify wireless printer
Peter Brigham MD
pmbrig at gmail.com
Tue Oct 12 14:18:51 EDT 2010
On Oct 12, 2010, at 10:17 AM, Mike Bonner wrote:
> Ignore any duplicates that show up, forgot to clean up last message
> and its
> being held for moderator approval, so don't know if they'll
> magically appear
> or not. This email is easier to read anyway. I'm actually awake now!
>
> Try this:
> get shell("cd /usr/sbin;system_profiler SPNetworkDataType |grep -i
> signature")
> set the itemdel to "="
> put the last item of it into yourplacetostoreit
>
> It grabs the hardware signature of the router and splits out the
> last item
> which is the routers mac address. Should be a more reliable method of
> tagging what network you're on. SSID may not be unique since so many
> people
> never change the default.
>
> This should work for wired or wireless.
Thanks, I'll experiment with that.
> I don't know how likely it is you'll have more than one valid
> connection at
> a time, if its a possibility for you, might consider testing it to
> see if it
> contains more than one line.
>
> Also running virtual machines could throw this off I guess, but it
> shouldn't
> be too bad to get a handle on things.
>
> If nothing else, don't split off the mac address and use the entire
> result
> as your matching text. If there IS more than 1 valid result, and
> you do use
> the entire thing as your match text, also might consider a sort
> since I
> can't test if system_profiler always lists in the exact same order.
-- Peter
Peter M. Brigham
pmbrig at gmail.com
http://home.comcast.net/~pmbrig
More information about the use-livecode
mailing list