What is the general syntax of a Unix shell command?

后端 未结 4 1861
说谎
说谎 2020-11-29 07:01

In particular, why is that sometimes the options to some commands are preceded by a + sign and sometimes by a - sign?

for example:

4条回答
  •  青春惊慌失措
    2020-11-29 07:49

    It's completely arbitrary; the command may implement all of the option handling in its own special way or it might call out to some other convenience functions. The getopt() family of functions is pretty popular, so most software written even remotely recently follows the conventions set by those routines. There are always exceptions, of course!

提交回复
热议问题