The BSD version of Ping(8), notably on OS X, includes a convenient "one ping only" option (-o) that mirrors Sean Connery's famous quote from Hunt for Red October. The option terminates Ping once the first reply is received.
I am trying to find out when the option was added or dropped from Ubuntu's Ping implementation. A note on Ars Technica's forum seems to hint that this is an older option (and perhaps has now been dropped?).
Any historical insight would be useful.
Why is this handy? Because you can do stuff like this:
ping -o 1.2.3.4; ssh ubuntu@1.2.3.4
and it will connect you with the server as soon as it becomes available on the network.
-o
is that-o
pings until you get one reply, and-c 1
pings exactly once, no matter the reply.