上QQ阅读APP看书,第一时间看更新
The shebang interpreter directive
The first line of a shell script is always the shebang interpreter directive; it basically tells our shell which interpreter it should use to parse and run the instructions contained in this script file.
It's called a shebang interpreter directive because it starts with a shebang, which is simply a sequence of two characters: a hash sign ( #) followed by an exclamation mark (!).
Some scripts might be written in Perl, or Python, or a different flavor of the shell; however, our script will be written for the Bash shell, so we should set the directive to the location of the bash executable, which we can derive from running /usr/bin/env bash. Therefore, add the following shebang as the first line in our e2e.test.sh file:
#!/usr/bin/env bash