Extracting meaningful data from strings is a crucial skill when working with bash, and bash gives us powerful tools to do so: head, tail, cut, sed, and awk. But these tools can be hard to understand without spending time to learn them, so many developers fall into a rut of blindly copying and pasting commands. No more! With this mini-course, you'll understand the basic ins and outs of these commands in under 15 minutes.
Overview
Syllabus
- Use head and tail to Get the Start or End of Text in Bash
- Find and Replace Text with Sed in Bash
- Delete Lines of Text with sed in Bash
- Insert Text with sed in Bash
- Split a String into Parts with `cut` in Bash
- Extract Data From Columns of Text with awk in Bash
- Extract Columns of Data from a CSV with awk
Taught by
Cameron Nokes