Rob Hudson wrote:
> I was just trying to search for a domain name of a friend's website. I
> have an idea of the block number he is in, so I wanted to do a quick
> bash look with nslookup to find the domain. But I'm stumped on the
> number range part.
>
> Can bash to a range [1-254] or 1..254 like perl?
>
> I tried many variations on the theme of:
>
> for i in 1..254; do nslookup 207.189.128.$i; done
A. (off-topic) host gives better output than nslookup.
B. This works, and technically it's a shell command.
$ perl -e 'print join";",map"host 207.189.128.$_",1..254' | sh
(Substitute nslookup for host if you prefer.)
C. Here it is with no Perl.
$ i=1
$ while [ $i -le 254 ]
> do
> host 207.189.128.$i
> i="`expr $i + 1`"
> done
D. (off-topic) That's a pretty eclectic netblock, once you get past
willamette.net's servers. Isn't Eugene wonderful?
--
Bob Miller K<bob>
kbobsoft software consulting
http://kbobsoft.com [EMAIL PROTECTED]