ping in a bash script
I would like to setup a ping test in one of my bash scripts. But *nix pings are continuous which would make the script continue until interrupted with Ctrl+C
How do you specify a certain number of pings to be issued?
ping -c $IPADDR
nm.. figured it out..
Last edited by bluethundr; February 13th, 2010 at 05:55 PM.
Reason: figured it out
Re: ping in a bash script
Yes, but you need an integer for the number of pings after the "-c" flag. For example, if you want to do three pings it would be:
Tags for this Thread