Rundeck 的@option.message@ 示例中的 at 符号对 bash 意味着什么?
What do the at-signs in Rundeck's @option.message@ example mean to bash?
Rundeck docs 给出了定义 message
选项(参数)的示例,然后脚本可以通过多种方式引用该选项,包括
echo message=@option.message@ ;# replacement token
我们使用这种语法,看起来不错,但我不知道这两个 @
实际上是什么 意思是 到 bash;我在评论中找不到 $@
以外的任何内容,也找不到与 "replacement token" 相关的任何内容。
根据您链接的 the docs,这是由 Rundeck 处理的 "replacement token"。也就是说,Rundeck 在将命令传递给 bash 之前替换了 @...@
。因此,它们对 bash 没有任何意义 :) 。具体来说,文档说:
Inline Script workflow steps that contain a token expansion will be expanded into a temporary file, and the temp file will contain the plaintext option value.
所以 bash 看到临时文件 post-expansion, 没有 @...@
序列和 有 它们的值作为文字文本。
文档还指出 "If the option is blank or unset the token will be replaced with a blank string." 因此,如果未定义特定标记,整个 @...@
序列将消失。
另请参阅文档中的 this section on script usage and this section on context variables。
Rundeck docs 给出了定义 message
选项(参数)的示例,然后脚本可以通过多种方式引用该选项,包括
echo message=@option.message@ ;# replacement token
我们使用这种语法,看起来不错,但我不知道这两个 @
实际上是什么 意思是 到 bash;我在评论中找不到 $@
以外的任何内容,也找不到与 "replacement token" 相关的任何内容。
根据您链接的 the docs,这是由 Rundeck 处理的 "replacement token"。也就是说,Rundeck 在将命令传递给 bash 之前替换了 @...@
。因此,它们对 bash 没有任何意义 :) 。具体来说,文档说:
Inline Script workflow steps that contain a token expansion will be expanded into a temporary file, and the temp file will contain the plaintext option value.
所以 bash 看到临时文件 post-expansion, 没有 @...@
序列和 有 它们的值作为文字文本。
文档还指出 "If the option is blank or unset the token will be replaced with a blank string." 因此,如果未定义特定标记,整个 @...@
序列将消失。
另请参阅文档中的 this section on script usage and this section on context variables。