for (( i=1; i<=254; i++ )) ; do echo $i; done

for lists (non numeric)
for i in * ; do ... ; done
for i in `ls /etc` ; do ...; done

Cory

On Wed, Mar 13, 2002 at 01:43:41PM -0800, 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
> 
> 
> -- 
> Rob <rob_at_euglug_dot_net>
> my @euglugCode = qw(v+++ e--- eug+ bsd+++ gnu+ S+++);

Reply via email to