Originally posted by google Great to hear that you have needs! By the way, are you asking or telling? How much of the script have you put together already?
first I am asking for a script. and I need it to be run in tcsh shell.
I tried to do one, but I always stuck in endless loop. so please help me.
well first, post the script that you have already written. then we can go from there. very rarely will you find someone who has the time to write out a script for you, especially if you are not willing to write one out on your own. not only that, but it can be insulting asking people to do work for you. were here to help, not to do work for you.
basically, all you would have to do is see the man page for ping.
so in the script that you are writing, you could first either assign $count whatever value you want, or ask for user input. this argument should be in there otherwise ping will go on for a while. take userinput for the -t flag and store it in $time_to_live
and finally define the $host_name of the machine to be pinged.
to take command line arguments with bash, go to tldp.org and search for the advanced bash shell scripting guide.
help with bash script!
im am working on this script to make sure my server will stay online, so i made this script..
HOSTS="192.168.138.155"
COUNT=4
pingtest(){
for myhost in "$@"
do
ping -c "$COUNT" "$myhost" &&return 1
done
return 0
}
if pingtest $HOSTS
#100% failed... (4 Replies)
Hi
I am using perl to ping a list of nodes - with script below :
$p = Net::Ping->new("icmp");
if ($p->ping($host,1)){
print "$host is alive.\n";
}
else {
print "$host is unreacheable.\n";
}
$p->close();... (4 Replies)
I am unable to ping my remote server.My server is unable to ping the same. both are able to ping the gateway. both the ip's are on same network.i use a proxy tunnel on my remote server.Help if any clues. (6 Replies)
Hi,
I develop simple animation ping script on Solaris Platform. It is like Cisco ping.
Examples and source code are below.
bash-3.00$ gokcell 152.155.180.8 30
Sending 30 Ping Packets to 152.155.180.8
!!!!!!!!!!!!!.!!!!!!!!!!!!!!!.
% 93.33 success... % 6.66 packet loss...... (1 Reply)
I have an old MP-Ras Unix system. I have setup netowkring but am unable to ping any local network pcs or the default gateway. If i use the arp -a command I receive the correct mac address for all connected pcs but I cannot ping anything except the local address. Any help would be appreciative.
... (7 Replies)
Hi All,
Need your help one more time.
I am trying to ping a linux machine which is not responding to ping.
However traceroute can reach the machine and I can log in to it by ssh. I have checked /proc/sys/net/ipv4/icmp_echo_ignore_all it is already set as "0".
It is not happening in the... (1 Reply)
Hi ,
I have one system installed on Linux Red Hat 3.0. I have ip of system 3.156.168.*** and i want to ping some port that is on this IP which command i can do this?
sam70 (1 Reply)
We can ping out but the return never comes back even to localhost
ping localhost
PING loopback: (127.0.0.1): 56 data bytes
64 bytes from 127.0.0.1: icmp_seq=0 ttl=255 time=0 ms
it just sits there....
any ideas, any files to check (1 Reply)
Hi there hope list can help
I'm looking for a command that does the following
lets say i ping a server 00.00.000.00
and this server is up and running how do i get the ping command to return a UP or a Down
meaning
if the command is true do this
if the command is False do this
... (2 Replies)
Hi,
When I pinged a machin, I got to be seen a different kind of
reply from that machine.
This is as below : "Reply from 136.128.11.116: Source quench received." Which I felt like an un-usual message.
So what does this mean.
Regards & Thanks in advance.
Vishwa. (4 Replies)