🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: script shell while anidado

#8093
From: J.A. Gutierrez
Date: Thu, 12 Dec 2002 13:44
36 lines
1973 bytes
Alberto Velasco <velasco@tid.es> wrote:
: 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;

	let VALB=1

: done
: #fin alberto.sh

	por cierto, no se si tiene mucho sentido buscar la direccion
	MAC de *.255...
	Ademas, antes de hacer un arp a una IP es conveniente hacerle
	un ping para que la cache de arp este actualizada.


-- 
PGP and other useless info at      \
http://www.cps.unizar.es/~spd/      \
finger://daphne.cps.unizar.es/spd    \       Timeo Danaos et dona ferentes
ftp://ivo.cps.unizar.es/pub/          \                         (Virgilio)   
Technical Details
Message-ID: <ata3rr$kkv$1@news.unizar.es>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!isdnet!news.rediris.es!news.unizar.es!not-for-mail
References: <3DF86DD3.F58230B4@tid.es>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII-7-bit
X-Google-Thread: f86c8,8a7f2b62fc8f7737
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2002-12-12 05:21:21 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-sterling!news-in-sterling.newsfeed.com!news-in.nuthinbutnews.com!isdnet!news.rediris.es!news.unizar.es!not-for-mail
From: "J.A. Gutierrez" <spd@daphne.cps.unizar.es>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: script shell while anidado
Date: 12 Dec 2002 13:44:27 GMT
Organization: Rank
Lines: 36
Message-ID: <ata3rr$kkv$1@news.unizar.es>
References: <3DF86DD3.F58230B4@tid.es>
NNTP-Posting-Host: daphne.cps.unizar.es
X-Trace: news.unizar.es 1039700667 21151 155.210.152.20 (12 Dec 2002 13:44:27 GMT)
X-Complaints-To: usenet@news.unizar.es
NNTP-Posting-Date: 12 Dec 2002 13:44:27 GMT
User-Agent: tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (IRIX/6.2 (IP22))