linux - shell 脚本和 makefile 的命名约定

标签 linux shell naming-conventions

我有几个存储共享变量的makefile,比如 CC=gcc ,我应该如何命名它们?

候选人是:

common.mk
Make.common
Makefile.common

..哪个更经典?有标准吗?

同样,我有一些shell脚本,我应该从以下中选择:

do_this_please.sh
do-this-please.sh
DoThisPlease.sh
doThisPlease.sh

是否有普遍接受的“大小写”和后缀?

最佳答案

Google 的开源风格使用下划线作为分隔符:https://google.github.io/styleguide/shellguide.html#s7.4-source-filenames .

所以在你的情况下,它会是 do_this_please.shdo_this_please 使用这种风格。

关于linux - shell 脚本和 makefile 的命名约定,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1790496/

相关文章:

shell - AIX 条件多命令执行

bash - 为什么 read 在 bash 和 dash 中的行为不同?

c# - 设计模式命名和说明 : Provider, 服务,经纪人

css - Bem 名称变得太长 - 最佳实践

JSF 托管 bean 命名约定

c - 多线程 random_r 比单线程版本慢

java - 使用 Java 检查 Linux 用户的组成员身份

linux - 如何从 shell 脚本安排 cron 作业

c - 如何等待子进程并获取其返回值

shell - 如何仅将文件中的第三行读入 shell 脚本中的变量