Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Nov 1998 16:20:03 -0500
From:      "Steve Friedrich" <SteveFriedrich@Hot-Shot.com>
To:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>, "Greg Lehey" <grog@lemis.com>
Subject:   Re: ping from fvwm2 menu
Message-ID:  <199811212122.QAA10367@laker.net>

next in thread | raw e-mail | index | archive | help
On Sat, 21 Nov 1998 19:52:41 +1030, Greg Lehey wrote:

>Why not write a script which does it the ping and then pauses until
>you press Enter?  Something like:
>
>+ "ping dukkha"  Exec xterm -n "dukkha" -T "ping dukkha" -e myping
>
>myping would then be:
>
>#!/bin/sh
>ping -c 5 dukkha
>read confirmation

And "read confirmation can be as simple as:
#include <stdio.h>

main()
{
	getchar();
}

You can compile it with:
cc pause.c -o pause

and then place pause somewhere along the path. I add
/usr/local/friedrich to the path, to keep my stuff seperate from
/usr/local (which isn't at all local...)

So Greg's script becomes:
ping -c 5 dukkha
pause

Note that there is no message output from my pause command, but you
could easily add one with printf or puts. This would be a good exercise
for C newbies...

HTH, and good luck...


Unix systems measure "uptime" in years, Winblows measures it in minutes.



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811212122.QAA10367>