Your First Bash Script: Shebang, Execute Permission, Exit Codes and When Not to Write a Script
A Bash script picks its interpreter with the shebang line, runs thanks to execute permission and talks to its caller through the exit code. With a 10-line script that checks the Bookstore API health endpoint we show the shebang and the dash difference, ./script.sh vs bash vs source, exit codes, the PATH, a script skeleton, the CRLF trap and when a job belongs to Python, PowerShell or a .NET 10 file-based app.
15 Nov 2026
·
15 min
·
6