Operating System - HP-UX
1753502 Members
4942 Online
108794 Solutions
New Discussion

Re: Alternative Ping Program Help.

 
Backd00redPr0xy
New Member

Alternative Ping Program Help.

Ok so basically I need help making a program in batch that will have the results like this

Enter IP Here:  ipputhere

and then will go on to ping -t ip

so basically just to make it look neater/nicer is what im looking for. Can anyone help me?

4 REPLIES 4
Steven Schweda
Honored Contributor

Re: Alternative Ping Program Help.

> [...] a program in batch [...]

   Define "a program in batch"?  Are you trying to write a shell script?
If so, how much don't you know about writing a shell script?

> Enter IP Here: ipputhere

   In "batch" mode, who will be (interactively?) providing the IP
address?

> so basically just to make it look neater/nicer is what im looking for.

   Define "neater/nicer"?  Do you want something different to happen in
the case when "ping" fails, compared to what happens when "ping"
succeeds?  (What, exactly?)

> Can anyone help me?

   Lacking a clear description of what you want, I can't.

Torsten.
Acclaimed Contributor

Re: Alternative Ping Program Help.

Not sure what you want to do.

Something like fping or pathping?


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
donna hofmeister
Trusted Contributor

Re: Alternative Ping Program Help.

i have to agree with everyone else -- you're not explaining yourself well.

it's very rare for a real batch script to expect human input.  It is, however, quite common in "regular" (not batch) scripts.

if you're wondering how to do user input -- check this writing shell scripts page.

this page even goes further!

i know the above examples are for linux....but it seem that it will be a worthwhile excerise for you to adapt them to hpux.

Laurent Menase
Honored Contributor

Re: Alternative Ping Program Help.

Also what do you mean by 'ping -t IP' ?

Do you mean like -t windows option or -t linux option?

Give an explicit example of what you want.

the equv to XP ping -t is ping with no option

-t is for ttl option

or do you look for something like

#!/usr/bin/ksh
echo what ip?
read ip
ping $ip -n 1 -m 1 

or

#!/usr/bin/ksh
echo what ip?
read ip
ping $ip -n 1 -m 1 -n 1 -m 1 >/dev/null && echo there || echo nothere