# Text Power Tools

Change text as it flows past, and turn columns into totals and reports.

Updated: November 10, 2026

## [Changing Text](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-changing-text)

1. [Find and Replace in a Stream: sed](https://www.ask-codey.com/lessons/bash-sed) (Journeyman): sed changes text as it flows past, replacing words with s/old/new/g and deleting lines with d, and sed -i.bak changes the files themselves while keeping a backup of each one.

## [Reports](https://www.ask-codey.com/courses/bash-in-depth/topics/bash-reports)

1. [Columns and Totals: awk](https://www.ask-codey.com/lessons/bash-awk) (Journeyman): awk splits every line into numbered fields, prints the ones you ask for, keeps only the lines that match a condition, and adds up a column, in total or per month, item or address.
2. [Building a Pipeline a Step at a Time](https://www.ask-codey.com/lessons/bash-building-a-pipeline) (Journeyman): Build a long pipeline the way people who write them do, starting with head on a few lines, adding one stage at a time and looking after each, and read someone else's one-liner the same way, from the left.

## [Exercise: The Website Log Report](https://www.ask-codey.com/courses/bash-in-depth/topics/exercise-bash-the-website-log-report)

1. [Exercise: The Website Log Report](https://www.ask-codey.com/lessons/exercise-bash-the-website-log-report) (Journeyman): Change the bakery's phone number on every web page with sed, keeping a backup of each, save the five most visited pages with a pipeline, and answer five questions about a week of the website's log and orders with awk, then let a check script tell you what's done.

Source: https://www.ask-codey.com/courses/bash-in-depth/chapters/bash-text-power-tools
