Simon Josefsson <[email protected]> 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.

Regards,
Sergey


Reply via email to