Skip to content

Commit

Permalink
Update 04_shell_scripts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eberdan authored Feb 21, 2024
1 parent ba2e4aa commit 9c5ad57
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Basic_shell/04_shell_scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ This line is the **absolute path to the Bash interpreter**. The shebang line ens

**Why do I need a shebang line? My scripts ran perfectly well before without it.**

Having a shebang line is best practice. Your script runs fine without it, because in our current environment bash is the default shell. We mentioned previously that there are various flavors of the shell, and if your system defaults to something other than bash the script will not work. To avoid any issues, we explicitly state that this script needs to executed using the bash shell.
Having a shebang line is best practice. Your script runs fine without it, because we call our script with the command `sh listing.sh`, the sh part tells the computer to use bash to interpret the script. However, we will not always use sh to call our scripts and different programs (perl, python, etc) will have different shebang lines. To avoid any issues, it is best practice to add a shebang line to tell the bash shell which interpreter to use.

#### Adding verbosity

Expand Down

0 comments on commit 9c5ad57

Please sign in to comment.