[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: awk or sed?



On Fri, 24 Sep 1999, Brad wrote:

> On Sat, 25 Sep 1999, Tim Thomson wrote:
> 
> > On Wed, 22 Sep 1999, Steve Lamb wrote:
> > 
> > > while(<>){
> > >   if ($_ =~ /inet addr:(\n+)\.(\n+)\.(\n+)\.(\n+)/){
> > >     $ipaddr = "$1.$2.$3.$4";
> > >   }
> > >   $return = `nslookup $1.$2.$3.$4`;
> > >   print($return);
> > > }
> > 
> > Thanks for all replies. It was actually cut I was thinking of initially.
> > I couldn't get this one to go, nothing was going into $1,$2, or $ipaddr.
> 
> Simple typo. Use \d (digit) instead of \n (linebreak).

I was thinking it was just something like that. I've been meaning to learn
perl for awhile. Any good starting points, apart from going through
source code? Thanks for the link to that awk link, looks good.

Thanks,

Tim.

-- 
Tim Thomson               tim@tui.dhs.org             ICQ: 18073712
Do not meddle in the affairs of Dragons,
for you are crunchy and taste good with ketchup!


Reply to: