多行bash评论礼仪(#)
发布时间:2020-12-16 01:20:26 所属栏目:安全 来源:网络整理
导读:Advanced Bash-Scripting Guide在示例中大量使用多行注释,形式如下: echo ls -l | sh# Passes the output of "echo ls -l" to the shell,#+ with the same result as a simple "ls -l". (在管道符号的说明中找到).其他多行注释如下所示: #!/bin/bash# rpm-
Advanced Bash-Scripting Guide在示例中大量使用多行注释,形式如下:
echo ls -l | sh # Passes the output of "echo ls -l" to the shell,#+ with the same result as a simple "ls -l". (在管道符号的说明中找到).其他多行注释如下所示: #!/bin/bash # rpm-check.sh # Queries an rpm file for description,listing,#+ and whether it can be installed. # Saves output to a file. # # This script illustrates using a code block. (链接页面中的示例3.2). 使用#的ratonale是什么?一些多行评论似乎表明评论在下一行继续,但其他评论则没有.
似乎Advanced Bash脚本编写指南的作者在继续上一行句子的行上使用它.
这不是标准的风格选择;这似乎是Advanced Bash Scripting Guide的作者的风格怪癖. 我将注意到虽然Advanced Bash Scripting Guide中有一些很好的技术信息,但编码风格相当不标准.我不会用它作为好的Bash编码实践的例子.一个更好的资源是Bash FAQ. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
推荐文章
站长推荐
- angular – CLI CORS代理不改变原点,仍然获得403
- 实习笔记6 WebService Axis2 传递Gzip压缩后的字
- scala – 在SBT上Spark 2.0.1的“未解决的依赖”
- angular – 使用CanActivate防护时获取“无提供程
- scala – 如何使sbt可移植?
- bash – 如何在shell脚本中的curl命令中传递一个
- webservice 使用vs2005生成代理
- bootstrap, boosting, bagging 几种方法的联系
- 如何设置我的vim-airline或vim-powerline
- 【小记备忘】之Winnet调用webservice【2013.12.2
热点阅读