What does "# $" mean in bash?

Say for example the script starts as follows

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

and then down the page the actual script comes into play. My question is: what does the symbol "# $" mean?

+6
source share
3 answers

Do you work on a group cluster in any way? How is the Sun Grid Engine? In scripts designed to run as a batch job, there may be special values.

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

Update:

higher link blocks when used from stackoverflow.com (works with google.com)

alternatives:

+6
source

Lines starting with # are comments. The first line may begin with #! but it is still a comment on bash and is simply used to indicate the interpreter to be used for the file. All other lines beginning with # are absolutely not important for bash , whether the next character has $ or something else.

+6
source

They seem to be parameters for the Grid Engine (ex-Sun), look at this SO question or this one .

They make heavy use of such comments.

+1
source

Source: https://habr.com/ru/post/914729/


All Articles