RE: How to retrieve a MAC address

2003-06-22 Thread Rai,Dharmender
this code would not work always as ifconfig runs in root login. > -- > From: Ashish Srivastava[SMTP:[EMAIL PROTECTED] > Sent: Monday, June 23, 2003 9:38 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: How to retrieve a MAC addr

Re: How to retrieve a MAC address

2003-06-22 Thread Ashish Srivastava
:50:54 PM To: [EMAIL PROTECTED] Subject: How to retrieve a MAC address   Hi All,   I need to retrieve the MAC address of my local system from a Perl script. I'm running RedHat 7.2.   Can anyone point me to some sample code for accomplishing this? I've Googled for quite a while, and come u

RE: How to retrieve a MAC address

2003-06-19 Thread abg
> Kipp, James wrote: > $ifconfig = '/sbin/ifconfig'; > my @hwaddrs = `$ifconfig` =~ /\b((?:[a-f\d]{2}:){5}[a-f\d]{2})\b/gi; Thanks! Worked like a charm. Aaron -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

Re: How to retrieve a MAC address

2003-06-19 Thread Beau E. Cox
- Original Message - From: "John W. Krahn" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 8:42 AM Subject: Re: How to retrieve a MAC address > "Beau E. Cox" wrote: > > > > Attached is a small perl script (ifinf

Re: How to retrieve a MAC address

2003-06-19 Thread John W. Krahn
"Beau E. Cox" wrote: > > Attached is a small perl script (ifinfo) I wrote to parse > ifconfig. It gives most of the information from ifconfig, > including MAC. It works on rh9. I tried it out out and found a couple of problems. Your GetOptions statement has: 'w|mac' => \$opt[2],

RE: How to retrieve a MAC address

2003-06-19 Thread Kipp, James
gex > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 12:49 PM > To: [EMAIL PROTECTED] > Subject: RE: How to retrieve a MAC address > > > Do you have any examples of this in action? > > > -Origi

Re: How to retrieve a MAC address

2003-06-19 Thread Beau E. Cox
- Original Message - From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 6:24 AM Subject: How to retrieve a MAC address > Hi All, > > I need to retrieve the MAC address of my local system from a Perl script. > I'm running RedHat

RE: How to retrieve a MAC address

2003-06-19 Thread abg
Do you have any examples of this in action? > -Original Message- > From: Kipp, James [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 11:26 AM > To: Aaron Gillette; [EMAIL PROTECTED] > Subject: RE: How to retrieve a MAC address > > > you can parse if

RE: How to retrieve a MAC address

2003-06-19 Thread Kipp, James
you can parse ifconfig or arp and get it > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 19, 2003 12:24 PM > To: [EMAIL PROTECTED] > Subject: How to retrieve a MAC address > > > Hi All, > > I need to retrie

How to retrieve a MAC address

2003-06-19 Thread abg
Hi All, I need to retrieve the MAC address of my local system from a Perl script. I'm running RedHat 7.2. Can anyone point me to some sample code for accomplishing this? I've Googled for quite a while, and come up empty. Alternatively, does anyone know where the MAC is stored on RedHat 7.2? Tha