Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion ebook/en/content/002-bash-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,11 @@ In order to execute/run a bash script file with the bash shell interpreter, the

This is also called a [Shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)).

All that the shebang does is to instruct the operating system to run the script with the `/bin/bash` executable.
All that the shebang does is to instruct the operating system to run the script with the `/bin/bash` executable.

However, bash is not always in `/bin/bash` directory, particularly on non-Linux systems or due to installation as an optional package. Thus, you may want to use:

```bash
#!/usr/bin/env bash
```
It searches for bash executable in directories, listed in PATH environmental variable.