From: Christopher Sawtell Date: 2001-11-09T06:48:52+09:00 Subject: [ruby-talk:24699] Re: how to get hostname/MAC address? On Fri, 09 Nov 2001 09:12, Tobias DiPasquale wrote: > Hi, > > Is there a way to get the computer's hostname or Ethernet MAC address > or IP address from Ruby? irb(main):002:0> system ( 'hostname -i') 192.168.2.10 irb(main):001:0> system ( '/sbin/ifconfig | grep HWaddr | cut -c39-') 00:90:27:2D:5A:C5 Assuming Unix / Linux & you might consider the hard '39' a bit too kludgy -- Sincerely etc., Christopher Sawtell