Summary
We started this chapter off by creating and running our very first shell script. As is almost mandatory when learning a new software language, we printed Hello World! onto our Terminal. Continuing, we explained the shebang: the first line of a script, it is an instruction to the Linux system about the interpreter it should use when running the script. For a Bash script, the convention is to have the file name end in .sh, with a shebang of #!/bin/bash.
We explained that there are multiple ways in which we can run a script. We can start with the interpreter and pass the script name as the argument (for example: bash hello-world.sh). In this case, the shebang is not needed because we're specifying the interpreter on the command line. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access