Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 26 Jun 2001 16:47:53 -0400
From:      Daniel Frazier <dfrazier@magpage.com>
To:        Peter Brezny <peter@sysadmin-inc.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: dns tool for reverse lookup of network range needed
Message-ID:  <3B38F4F9.15F2F925@magpage.com>
References:  <NFBBKAEAALGGGFKINBLAGEEOCAAA.peter@sysadmin-inc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Peter Brezny wrote:
> 
> Daniel,
> 
> Thanks alot for the great command line.
> 
> Unfortunately, I don't have a programming background and i'm a bit slow to
> catch on.
> 
> however when i put
> 
> x=0; while [ $x -lt 255 ]; do echo $x; host 216.155.24.$x; x=`echo "$x + 1"
> | bc`; done
> 
> onto a command line, i get an error.
> 
> I tried
> sh $x=0; while [ $x -lt 255 ]; do echo $x; host 216.155.24.$x; x=`echo "$x +
> 1" | bc`; done
> 
> as well.
> 
> Due to my lack of programming/ scripting knowledge, it would really help if
> you had the time to spell this one out for me...
> 

you could try putting these commands in a file.  open a new file (I'll
call it reverse.sh) and insert the following...

#!/bin/sh
x=0
while [ $x -lt 255 ]
do
host 216.155.24.$x
x=`echo "$x + 1" | bc`
done

...then run the file by doing...

$ sh reverse.sh

that should do it.  for future reference, remember to cc the list so 
that anyone else who is interested can read it...

-- 
----------------------------------------------------------------------
Daniel Frazier  <dfrazier@magpage.com>   Tel:  302-239-5900 Ext. 231
Systems Administrator                    Fax:  302-239-3909
MAGPAGE, We Power the Internet           WWW:  http://www.magpage.com/

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
        - Benjamin Franklin, Historical Review of Pennsylvania, 1759.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B38F4F9.15F2F925>