Added build files to turn the bible into a book

This commit is contained in:
Dylan Araps
2018-06-20 12:24:38 +10:00
parent dbed16c54e
commit e0aadbde13
23 changed files with 1907 additions and 1 deletions

52
manuscript/chapter13.txt Normal file
View File

@@ -0,0 +1,52 @@
# Obsolete Syntax
## Shebang
Use `#!/usr/bin/env bash` instead of `#!/bin/bash`.
- The former searches the user's `PATH` to find the `bash` binary.
- The latter assumes it is always installed to `/bin/` which can cause issues.
```shell
# Right:
#!/usr/bin/env bash
# Wrong:
#!/bin/bash
```
## Command Substitution
Use `$()` instead of `` ` ` ``.
```shell
# Right.
var="$(command)"
# Wrong.
var=`command`
# $() can easily be nested whereas `` cannot.
var="$(command "$(command)")"
```
## Function Declaration
Don't use the `function` keyword, it reduces compatibility with older versions of `bash`.
```shell
# Right.
do_something() {
# ...
}
# Wrong.
function do_something() {
# ...
}
```
<!-- CHAPTER END -->