* Is this possible/easy?
@ 1997-03-03 16:06 Jason Price
1997-03-03 16:16 ` Timothy Luoma
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Jason Price @ 1997-03-03 16:06 UTC (permalink / raw)
To: zsh-users
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.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Is this possible/easy?
1997-03-03 16:06 Is this possible/easy? Jason Price
@ 1997-03-03 16:16 ` Timothy Luoma
1997-03-03 16:39 ` Szekeres Istvan
` (2 more replies)
1997-03-03 16:49 ` Zefram
` (2 subsequent siblings)
3 siblings, 3 replies; 8+ messages in thread
From: Timothy Luoma @ 1997-03-03 16:16 UTC (permalink / raw)
To: Jason Price; +Cc: zsh-users
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@cad.gatech.edu>
> To: zsh-users@math.gatech.edu
> Subject: Is this possible/easy?
> Resent-Date: Mon, 3 Mar 1997 11:04:23 -0500 (EST)
> Resent-From: zsh-users@math.gatech.edu
>
> 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.
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Is this possible/easy?
1997-03-03 16:06 Is this possible/easy? Jason Price
1997-03-03 16:16 ` Timothy Luoma
@ 1997-03-03 16:49 ` Zefram
1997-03-04 12:18 ` gwing
1997-03-15 12:07 ` Hendrik Visage
3 siblings, 0 replies; 8+ messages in thread
From: Zefram @ 1997-03-03 16:49 UTC (permalink / raw)
To: Jason Price; +Cc: zsh-users
Jason Price wrote:
>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?
for n in {0..255}; do
ping 150.150.150.$n
done
or, with 3.1, and less dependent on options,
for((n=0; n<256; n++)); do
ping 150.150.150.$n
done
I actually have a program that performs a related task, that uses both
of the above methods at different points, for maximal efficiency.
-zefram
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Is this possible/easy?
1997-03-03 16:06 Is this possible/easy? Jason Price
1997-03-03 16:16 ` Timothy Luoma
1997-03-03 16:49 ` Zefram
@ 1997-03-04 12:18 ` gwing
1997-03-15 12:07 ` Hendrik Visage
3 siblings, 0 replies; 8+ messages in thread
From: gwing @ 1997-03-04 12:18 UTC (permalink / raw)
To: Jason Price; +Cc: zsh-users
[-- Attachment #1: Type: application/pgp, Size: 1170 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Is this possible/easy?
1997-03-03 16:06 Is this possible/easy? Jason Price
` (2 preceding siblings ...)
1997-03-04 12:18 ` gwing
@ 1997-03-15 12:07 ` Hendrik Visage
3 siblings, 0 replies; 8+ messages in thread
From: Hendrik Visage @ 1997-03-15 12:07 UTC (permalink / raw)
To: Jason Price; +Cc: zsh-users
Jason Price writes:
> 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.
>
There's a program called "fping" that'll do this in a VERY efficient
manner, like reading the list from stdio or a file or command
line. Does these kind of pings and give the answers MUCH faster than
individual pings would. (Sorry if I'm late, but were on vacation, and
this needs a better answer than given via the list)
> 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.
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
>
Hendrik Visage
HendrikV@disun.denel.co.za
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~1997-03-15 12:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-03 16:06 Is this possible/easy? Jason Price
1997-03-03 16:16 ` Timothy Luoma
1997-03-03 16:39 ` Szekeres Istvan
1997-03-03 16:40 ` Clint Adams
[not found] ` <luomat@peak.org>
1997-03-03 17:24 ` Bart Schaefer
1997-03-03 16:49 ` Zefram
1997-03-04 12:18 ` gwing
1997-03-15 12:07 ` Hendrik Visage
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).