On 26 Feb 2007 at 18:13, D. Bolliger wrote:
> Beginner am Montag, 26. Februar 2007 17:02:
> > On 26 Feb 2007 at 15:58, D. Bolliger wrote:
> > > Beginner am Montag, 26. Februar 2007 14:50:
>
> Hi
>
> > > > I am trying to parse some dhcp-lease files to extract the ip, mac and
> > > > hostname.
..s
Beginner am Montag, 26. Februar 2007 17:02:
> On 26 Feb 2007 at 15:58, D. Bolliger wrote:
> > Beginner am Montag, 26. Februar 2007 14:50:
Hi
> > > I am trying to parse some dhcp-lease files to extract the ip, mac and
> > > hostname.
> > >
> > > I am struggling to get either, the regex of the $/,
Beginner wrote:
> On 26 Feb 2007 at 15:58, D. Bolliger wrote:
>>
>>#!/usr/bin/perl
>>
>>use strict;
>>use warnings;
>>
>>{
>> local $/="}\n";
>> for () {
>>my ($ip,$mac,$host)=
>> /lease\s+(\S+).*
>>ethernet\s+(\S+);.*
>>hostname\s+(\S+);
>> /sx;
>>print "I
On 26 Feb 2007 at 15:58, D. Bolliger wrote:
> Beginner am Montag, 26. Februar 2007 14:50:
> > Hi,
>
> Hi
>
> > I am trying to parse some dhcp-lease files to extract the ip, mac and
> > hostname.
> >
> > I am struggling to get either, the regex of the $/, correct. I am not
> > sure which combinat
Beginner am Montag, 26. Februar 2007 14:50:
> Hi,
Hi
> I am trying to parse some dhcp-lease files to extract the ip, mac and
> hostname.
>
> I am struggling to get either, the regex of the $/, correct. I am not
> sure which combination of these I should use.
>
> There is some sample data and my b
Hi,
I am trying to parse some dhcp-lease files to extract the ip, mac and
hostname.
I am struggling to get either, the regex of the $/, correct. I am not
sure which combination of these I should use.
There is some sample data and my best effort below. Can anyone offer
any pointers?
TIA,
Dp.