I was told that the first line shebang (#!/bin/bash) is necessary in the shell script file, and the file won't run accurately without this line. But I tested some scripts. They work just fine without that line.Is that line simply a comment? Does bash omit this line, as it does with other comments? Or does bash interpret it?Is that line forced in that format? Or just a helpful readable note? What if I put it in other way, say, without the !?
Why is the first line comment of .sh file necessary?
bash;scripting;shebang