Leaving presentation mode.

Improve Command-line Productivity

Dennis Kibbe

Mesa Community College

Keyboard Shortcuts

Module Outline

Learning Objectives

After completing the work in this module you will be able to:

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

Run repetitive tasks with for loops, evaluate exit codes from commands and scripts, run tests with operators, and create conditional structures with if statements.

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

Create regular expressions to match data, apply regular expressions to text files with the grep command, and use grep to search files and data from piped commands.

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!!

Summary

Resources

Graded Lab

Improve Command-line Productivity

Created 17 February 2025 by Dennis Kibbe. Last modified $Date: 2025/02/18 09:19:11 $ by $Author: dnk $.