Leaving presentation mode.
Improve Command-line Productivity
Dennis Kibbe
Mesa Community College
Module Outline
- Write Simple Bash Scripts
- Loops and Conditional Constructs in Scripts
- Match Text in Command Output with Regular Expressions
- Graded Lab
Learning Objectives
After completing the work in this module you will be able to:
- Use the features of the Bash shell to run commands more efficiently.
- Use a
for
loop to run repeatative commands.
- Evaluate exit codes.
- Create conditional structures with
if
statements.
Write Simple Bash Scripts
Create and Execute Bash Shell Scripts
Specify the Command Interpreter
Execute a Bash Shell Script
Quote Special Characters
Provide Output from a Shell Script
Guided Exercise
Write Simple Bash Scripts
Guided Exercise
Loops and Conditional Constructs in Scripts
Guided Exercise
Match Text in Command Output with Regular Expressions
Loops and Conditional Constructs in Scripts
Use Loops to Iterate Commands
Process Items from the Command Line
Process Items from the Command Line
Conditional Structures
Use the If/Then Construct
Use the If/Then Construct
Use the If/Then/Elif/Then/Else Construct
Guided Exercise
Loops and Conditional Constructs in Scripts
Match Text in Command Output with Regular Expressions
Write Regular Expressions
Describe a Simple Regular Expression
Match the Start and End of a Line
Basic and Extended Regular Expression
Wildcard and Multiplier Usage in Regular Expressions
Match Regular Expressions from the Command Line
Isolating Data with the grep Command
The grep Command Options
Examples of the grep Command
Guided Exercise
Match Text in Command Output with Regular Expressions
Guided Exercise
SUBTITTLE HERE!!
Graded Lab
Improve Command-line Productivity
Keyboard Shortcuts