Interview question

This question is step 3 of the course “Your first bash script”

The shebang and ways to run a script

easy~4 min

Why do scripts start with #!/bin/bash on the first line? How are bash deploy.sh and ./deploy.sh different? And why does plain deploy.sh (without ./) answer command not found even though the file is in the current directory?

Just like in an interview: answer in your own words, and the AI will mark which key points you covered. To pass, cover more than half of them.

Loading…