[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-inetutils] Re: ping, --count=NUMBER

From: Sergey Poznyakoff
Subject: Re: [bug-inetutils] Re: ping, --count=NUMBER
Date: Tue, 19 May 2009 12:27:51 +0300

Simon Josefsson <address@hidden> ha escrit:

> what would the following mean?
> ping -c 3468664375
> Is the number a -c count or the IP address?
> If the -c parameter is optional, both are valid interpretations.

In traditional behavior, the `-c' option takes mandatory argument.
Mandatory arguments may be separated from their option by any amount of
whitespace, or by no whitespace at all, so in this case the answer is
"3468664375 is a ping count", for both `ping -c 3468664375' and
`ping -c3468664375'.

Now, if we make `-c' parameter optional, then its actual argument (when
present) must be given immediately after the option letter, with no
intervening whitespace, so that:

  ping -c3468664375

means "send ping 3468664375 times", whereas

  ping -c 3468664375

means "send ping the default number of times to the IP 3468664375".

And that's not compatible with the traditional behavior, when both
invocations mean the same thing.

> I don't see any reason to deviate from the traditional behaviour here.

Neither do I.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]