【发布时间】:2019-04-26 21:51:11
【问题描述】:
我在https://www.tldp.org/LDP/abs/html/special-chars.html 上阅读有关 bash 脚本的教程 并注意到一些 cmets 以 #+ 而不是 #
开头echo ls -l | sh
# Passes the output of "echo ls -l" to the shell,
#+ with the same result as a simple "ls -l"
我猜作者决定使用#+ 来提及上一行的继续评论。 是这种情况吗?它是 bash 中的常见约定吗?
【问题讨论】:
-
这只是他们自己的(愚蠢的)约定(用于评论继续)。顺便说一句,ABS 曾经被 Bash 人所反对,因为它曾经充满了反模式。我不知道最近的修订情况如何,但我相信那里有更好的来源。
-
@gniourf_gniourf 你能推荐一两个更好的来源吗?
-
谢谢! @gniourf_gniourf
标签: bash