in reply to Re: Re: Ping and Tracert
in thread Ping and Tracert

You get the OS name in $^O so all you need to do is (pseudocode)

print "The OS is $^O"; if ( $^O =~ /Linux/ ) { &linux_ping; } elsif ( $^O =~ /Solaris/ ) { &sun_ping; } else { die "Get a real OS!\n"; }

I don't know what $^O holds on Solaris so you will have to tweak the matches to suit.

cheers

tachyon

s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print

Replies are listed 'Best First'.
Re: Re: Re: Re: Ping and Tracert
by qball (Beadle) on Aug 31, 2001 at 22:36 UTC
    Ok, I can ping Linux X number of times using -c, but Solaris? What's the param for that. I've been searching through the man pages and can't find it.

    Thanks.

    qball~"I have node idea?!"

      Sorry, can't help. You could always fall back on a loop &ping for 0..4

      cheers

      tachyon

      s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print