Re: Attn: Scripting wizards

From: Bill (william.mcnamara@silicomp.fr)
Date: Mon Sep 04 2000 - 13:18:44 CEST


Exacly what I wanted....
ping -c $[$2/$3] -i $3 $1 > $4

I guess I should read the man pages more often!!

Thanks,
Bill

ian@hfs.dhs.org wrote:

> Bill--
>
> A script to do this would actually defeat it's own purpose because
> ping with the appropriate options and redirection to an output file would
> do the same thing...Though you'd have to convert the duration by hand
> expressed in means of a count.
>
> Of course, if you really wanted, here's a basic script that'd do the
> trick..
>
> # Syntax: myping <host> <duration> <interval> <file>
> ping -c $[$2/$3] $1 > $4
>
> # END OF SCRIPT
>
> I don't guarentee the script works, as I haven't tested it.
>
> --Ian Elliot
>
> On Mon, 4 Sep 2000, Bill wrote:
>
> >
> > I'm trying to write a basic script that will ping a host for a specific time
> > frame
> > and with user set intervals and pipe the output to a file... something like
> >
> > myping [host] [duration minutes] [interval seconds] [output - path and file
> > name]
> >
> > example > myping -host 1.2.3.4 -duration 60 -interval 60 -file
> > /tmp/pinglog.txt
> >
> > where host is the ip address of the target, duration is the time for the
> > script to run, interval is the number of seconds between pings, output is
> > the directory and file name to pipe the output too.
> >
> > I'm not having much luck as my scripting is basic enough, so I thought
> > I'd ask you guys....
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:15 CET