简体   繁体   English

什么“#$”在bash中意味着什么?

[英]What does “#$” mean in bash?

Say for example a script begins like this 比方说,脚本就像这样开始

#!/bin/bash
#$ -S /bin/bash
#$ -l hostname=qn*

and then later down the page the actual script comes into play. 然后在页面下面,实际的脚本开始发挥作用。 My question is what does the "#$" symbol mean or do? 我的问题是“#$”符号的含义是什么?

Lines beginning with # are comments. #开头的行是注释。 The first line may begin with #! 第一行可能以#!开头#! , but it's still a comment to bash and is merely used to indicate the interpreter to use for the file. ,但它仍然是对bash的评论,仅用于指示用于文件的解释器。 All other lines beginning with # are absolutely unimportant to bash , whether the next character is $ or anything else. 所有其他以#开头的行对于bash绝对不重要,无论下一个字符是$还是其他任何字符。

Are you by any means running on a batch cluster ? 您是否以任何方式在批处理群集上运行? Like Sun Grid Engine? 像Sun Grid Engine一样? There might be special meanings in scripts intended to run as a batch job. 用作批处理作业的脚本可能有特殊含义。

https://www.wiki.ed.ac.uk/display/EaStCHEMresearchwik/How+to+write+a+SGE+job+submission+script https://www.wiki.ed.ac.uk/display/EaStCHEMresearchwik/How+to+write+a+SGE+job+submission+script

Update: 更新:

above link blocks when used from stackoverflow.com (works from google.com) 从stackoverflow.com使用上面的链接块(来自google.com)

alternatives: 备择方案:

They seem to be parameters for the Oracle (ex-Sun) Grid Engine, look at this SO question or this one . 它们似乎是Oracle(前Sun)Grid Engine的参数,看看这个SO问题还是这个 问题

They are heavily using these kind of comments. 他们大量使用这些评论。

这些行对于像sbatch这样的队列系统很重要。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM