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

Especially about user-defined commands/scripts.

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top