Domanda

Is there are any convention/agreement about bash commands/scripts naming?

Especially about user-defined commands/scripts.

È stato utile?

Soluzione

From the POSIX shell guidelines for utility syntax:

Guideline 2: Utility names should include lowercase letters (the lower character classification) and digits only from the portable character set.

Altri suggerimenti

All standard command tend to be lower-case (with X and a few related utilities being the only notable exceptions that come to mind, but these are seldom invoked from the command line directly). This is quite obviously convenient: a lower-case character is just one keystroke while uppercase takes two at the same time and thus is much more cumbersome to type. This is somewhat alleviated by tab completion but nonetheless, using upper case in shell commands stands out and doesn't fit the UNIX conventions too well.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top