Conventions used
There are a number of text conventions used throughout this book.
Code in text
: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: “Now, whenever you need to access this directory, you can simply type cd $MY_DEEP_DIRECTORY
, and Bash will take you there instantly.”
A block of code is set as follows:
#!/usr/bin/env bash if [ $USER == 'steve' ] && [ -f "/path/to/file.txt" ]; then echo "Hello, Steve. File exists." elif [ $USER == 'admin' ] || [ -f "/path/to/admin_file.txt" ]; then echo "Admin access granted or admin file exists."
Any command-line input or output is written as follows:
$ cd /home
Bold: Indicates a new term, an important word, or words that you see onscreen. For instance, words in menus or dialog boxes appear in bold. Here is an example: “In the Model Setting tab, ensure that you select your model and set Freedom to Precise. Click the Save button.”
Tips or important notes
Appear like this.