could anyone help me out??

student

New Member
Credits
0
if linux systems will not consider anything after # sign in the scirpt, then how come #!/bin/bash works??
#!/bin/bash starts with # sign it shouldn't be consider right??but if the #!/bin/bash is not included in the scirpt its not working??? explain me pls......
 


wizardfromoz

Administrator
Staff member
Gold Supporter
Credits
18,342
G'day @student and welcome to linux.org :)

Google reveals




SCREENSHOT 1 - GOOGLE SEARCH


You may be aware that there are a number of different Shells, the Bourne Again SHell (bash) being just one of them.

https://www.howtogeek.com/68563/htg-explains-what-are-the-differences-between-linux-shells/

#!/bin/bash
... is called "the shebang". Its "syntax" ie structure acts as a flag to other programs and parts of Linux that we are about to run a Bash script.

The shebang is like a Header for the script.

Once into the body of the script, # acts to indicate a comment. It can be used for multiple lines of comments.

Chris Turner
wizardfromoz
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!


Top