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
>
>Thanks,
>Rob
>
>
It would probably be easier in perl. You could use a while loop, with
i = `expr $i + 1`
somwhere in there...
something like:
i = 1
while [[ $i < 254 ]]
do
nslookup 207.189.128.$i
i = `expr $i + 1`
done
The syntax might not be quite right, but you get the idea...
Kahli