writing script to combine traceroute and ping

After having used pathping in Windows, and seeing what it can do and how nice it is and that there is no tool like this for Linux, so I figured maybe writing a bash script that combines traceroute and ping like pathping does would be doable and good. The problem is, I have never written a bash script before, so I’d need a lot of help.

Wouldn’t mtr or xmtr do what you want under Linux?

zypper info mtr
zypper info mtr-gtk

On 02/10/2011 09:36 PM, Jonathan R wrote:
> pathping in Windows… bash script that combines traceroute and ping

i know nothing about “pingpath” but i can’t imagine what could be
written into a traceroute-ping combo script that is not already
available with mtr…

CAVEAT: http://is.gd/bpoMD
[NNTP posted w/openSUSE 11.3, KDE4.5.5, Thunderbird3.0.11, nVidia
173.14.28 3D, Athlon 64 3000+]
“It is far easier to read, understand and follow the instructions than
to undo the problems caused by not.” DD 23 Jan 11

Actually, it would. I just didn’t know about it’s existance. Thanks for showing this to me.

To answer your original quest, I think you could write a function that passes the address you want to ping and traceroute. Not much to do with traceroute but you can modify ping with using an alias.
For example, Windows limits ping to 5 tries while Linux does not, alias below aliases ping limit to 5 pings.

### read  man alias 
alias ping="/bin/ping -c 5"
alias ping6="/bin/ping6 -c 5"

Otherwise I outline function but not write your function
PngTrcrt ()
{ # comment see man bash for help writing a bash function and where they should be saved
command $1
command $1