2

Some binaries in Unix-Linux systems like ping or mount have a long argument. For example if we write ping -h in the terminal, one of the options is:

Usage: ping [-aAbBdDfhLnOqrRUvV64]

Is this long set of characters really an argument?

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
abs
  • 29
  • "This is quite nicely explained in man man:

    ... [-abc] any or all arguments within [ ] are optional."

    – muru Jul 01 '18 at 22:47
  • See https://stackoverflow.com/questions/36495669/difference-between-terms-option-argument-and-parameter – jlliagre Jul 01 '18 at 23:59
  • That duplicate doesn't even answer the question of what -abc means here. The brackets make things optional, but there's still a difference between a literal string, a concatenation of multiple optional switches, and a string that's actually a description of some value. – ilkkachu Jul 02 '18 at 05:26
  • No, it is a list of possible arguments! However, it is only an abbreviated list, the details are in man ping! – peterh Jul 02 '18 at 08:29

1 Answers1

12

No, this is an abbreviated way of listing all the possible single-letter options: -a, -A, -b, etc. See the ping manpage for details (for better results, run man ping on your own system — that will show the documentation for the version you have installed).

Stephen Kitt
  • 434,908
  • Note that getopt-based programs usually can take arguments that way, although some may be mutually exclusive, such as -4 and -6 in this case. – Nonny Moose Jul 02 '18 at 01:37