Chapter 1: Introduction and Revision
- Command-line structure
- Shell interpretation
- Filename expansion
- Variable and command expansions
- Quoting
- Redirection
- Here documents
- Pipes
Chapter 2: Using BASH
- The Bash story (in brief)
- Bash personalities
- Shell options
- Bash shell options
- Start-up files
- Some shell variables
- Aliases and functions
- Command-line recall and editing
- Navigation for the impatient
- echo and help
Chapter 3: Shell Scripts
- Command types
- Creating shell scripts
- Creating processes
- The exec command
- Exit status
- Using # in shell scripts
- Running shell scripts
- BASH_ENV
- Command groups and sub-shells
Chapter 4: Handling Variables
- Legal variable names
- Creating variables
- The read command
- Exporting variables
- Special characters
- Checking the environment
- eval
Chapter 5: Parameters and Friends
- Positional parameters
- Access to positional parameters
- $*, $@, and $#
- Changing positional aparmeters
- $* versus $@
- Other special variables
Chapter 6: Behaviour Therapy
- Sending signals,
- Receiving signals and the trap command
- Shell tracing methods
- Tracing shell expansions
- DEBUG and ERR traps
- Dry run of a script
- The script command
- Error messages are your friends
Chapter 7: Flow Control
- Testing commands
- 'if' statements
- 'while' and 'until' loops
- Bourne shell test command
- Korn shell test command
- Bourne and Korn syntax compared
- Numeric tests
Chapter 8: Variable Expansion
- Extracting a sub-string
- Deleting a sub-string
- Editing sub-strings
- Test and set/exit expansions
- The colon command
Chapter 9: Lofty Variables
- Variable attributes
- Compound assignments
- Arithmetic conditionals
- Working with floating-point
Chapter 10: More Loops
- List processing - 'for' loop
- Processing positional parameters
- 'break' and 'continue'
- Infinite loops
- The 'select' loop
- Reading in a loop from a file
- Reading in a loop from a program (process substitution)
Chapter 11: Sophisticated Tests
- Statement short-cuts
- I/O redirection with if-then-fi
- The 'case' statement
- case flow control - Bash 4
- Shell pattern matching
- Extended pattern operators
- Locales and character classes
Chapter 12: Using Functions
- Functions vs. scripts
- Creating functions
- Listing and removing functions
- Function parameters and return values
- Local and global variables
- Where to store functions
- Exported functions
- Using external function libraries
Chapter 13: Professional Scripts
- Parsing script options with getopts
- Handling errors
- Formatting output - printf
- Tips for shell programmers: programming for change
- Tips for shell programmers: programming for performance
Chapter 14: Handling Arrays
- Arrays: the concepts
- Bash array syntax
- Array syntax gotchas
- Initialising arrays
- Appending to an array
- Finding array limits
- Using read with an array
- Using mapfile/readarray
- Associative arrays
Chapter 15: Advanced IO
- The concepts
- Using file descriptors
- Block redirection
- Named pipes (FIFOs)
- Process substitution
Chapter 16: Basic sed
- Running sed
- Basic regular expressions
- sed line addressing
Chapter 17: Basic awk
- The awk programming model
- awk variables
- awk opeators
- Comparing awk with shell constructs
Certification:
This course will assist delegates preparing for the following exams:
- LPI General Linux I - L101