Bash — The First Line of a Script: #!/bin/bash and the Shebang
What exactly happens when you put `#!/bin/bash` at the top of a script? Learn what a shebang really is, how the OS uses it, why `sh` isn't always Bash, and the difference between running, sourcing, and explicitly invoking a script.