🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #8091

script shell while anidado

#8091
From: Alberto Velasco
Date: Thu, 12 Dec 2002 11:07
26 lines
1552 bytes
Hola, me estoy volviendo loco para hacer un simple while anidado:

#!/bin/bash
#alberto.sh
#Script para capturar todas las MACs de la empresa con su respectiva IP.

echo "Buscando IPs"
VAL=1
VALB=1
IP="10.95."
while [ $VAL -lt 255 ]
do
        while [ $VALB -lt 255 ]
        do
                echo arp $IP$VAL"."$VALB
                let VALB=VALB+1
        done
        let VAL=VAL+1;

done
#fin alberto.sh


Sencillo verdad??? pues no me funciona... s�lo me hace el primer bucle,
hasta 10.95.1.255 y se para. �Cu�l es el problema? Espero que alguien me
pueda echar una mano. Gracias por anticipado.
Technical Details
Message-ID: <3DF86DD3.F58230B4@tid.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!news-small.astraweb.com!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!newsf01.ono.com!news.rediris.es!news-2.rediris.es!tidos.tid.es!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,8a7f2b62fc8f7737,start
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-12-12 03:20:27 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!news-small.astraweb.com!news-out.spamkiller.net!propagator2-maxim!news-in.spamkiller.net!newsf01.ono.com!news.rediris.es!news-2.rediris.es!tidos.tid.es!not-for-mail
From: Alberto Velasco <velasco@tid.es>
Newsgroups: es.comp.os.linux.programacion
Subject: script shell while anidado
Date: Thu, 12 Dec 2002 12:07:00 +0100
Organization: Telefonica I+D
Lines: 27
Message-ID: <3DF86DD3.F58230B4@tid.es>
NNTP-Posting-Host: PEGALAJAR.hi.inet
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mailer: Mozilla 4.78 [es] (Windows NT 5.0; U)
X-Accept-Language: es-ES,en