6/25 how do you do this w/ a shell "foreach" or equiv?:
for ($i=0;$i<127;$i++) {
print "$i: ",`whois -h http://whois.arin.net ${i}.0.0.0 | head -1`;
}
\_ csh: --jsjacob
% @ n=0
% while ($n < 127)
while? echo "${n}: `whois -h http://whois.arin.net ${n}.0.0.0 | head -1`"
while? @ n++
while? end
\_ sh: -- schoen
$ N=1; while [ $N -lt 127 ]
> do echo "$N, `whois -h http://whois.arin.net $N.0.0.0 | head -1`"
> N=`expr $N + 1`
> done
\_ However, there is a limit on the query rate in practice, which
makes this not work quite right.
\_ A 5 second delay is sufficient
\_ Aren't there others besides http://whois.arin.net? Can't you do
host ${n}.0.0.0 | head -l
\_ it's head -1, not head -l!
\_ It's not finding a host in DNS, it's finding a network in whois
\_ Use whois.nic.mil instead. Faster server.
\- jot 128 0 --psb |