The following resources might be interesting if you'd like to go deeper into the subjects of this chapter:
- The test command: http://wiki.bash-hackers.org/commands/classictest
- Bash debugging: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_03.html
- Logical operators: https://secure.php.net/manual/en/language.operators.logical.php