Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Is this possible/easy?



well, you could do something like this:

for i in ip1 ip2 ip3
do

ping $i >> ping.out
done

(BTW: say you had 150.121.555.xxx where xxx started at 000 and went to
255, how would you get that to loop?  I thought it would look like this

for i in [000 - 255]
do
	ping 150.121.555.$i
done

but I've tried all sorts of brackets and can't get it to work.  Anyone
know?  I could really use this with some other scripts too

TjL



On Mon, 3 Mar 1997, Jason Price wrote:

> Date: Mon, 3 Mar 1997 11:06:50 -0500 (EST)
> From: Jason Price <gt5076c@xxxxxxxxxxxxxx>
> To: zsh-users@xxxxxxxxxxxxxxx
> Subject: Is this possible/easy?
> Resent-Date: Mon, 3 Mar 1997 11:04:23 -0500 (EST)
> Resent-From: zsh-users@xxxxxxxxxxxxxxx
> 
> I need to generate a script to ping all the IP addresses in a couple
> of class C's.  (So we can double check our records, and see which are
> in use) Is there a way to generate this easilly?  Even something to
> list them all out, and redirect the output would be enough.
> 
> Something like
> 
> 150.150.150.0
> 150.150.150.1
> 150.150.150.2
> ...
> 150.150.150.255
> 
> Thanks;
> Jason
> 
> -- 
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>    Jason Price   | The brain is a wonderful organ: it starts working the
> Theta Xi, BA 449 | moment you get up, and doesn't stop till you get to class.
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> 



Messages sorted by: Reverse Date, Date, Thread, Author