Learn how to manipulate and format data with AWK, a Mac and Linux command-line tool.
Overview
Syllabus
Introduction
- Welcome
- What you should know before watching this course
- Using the exercise files
- What is AWK?
- Writing an AWK program
- Working with records, fields, patterns, and actions
- Using AWK command-line flags
- Exploring basic input-field separators
- Specifying field and record separators with variables
- Challenge: Change a CSV file to a tab-separated one
- Solution: Change a CSV file to a tab-separated one
- Using built-in variables
- Creating user-defined variables
- Working with operators and arrays
- Regular expression basics
- Working with character classes and quantifiers
- Building control structures
- Creating an HTML table
- Challenge: Print only those lines consisting of a complete HTML entity
- Solution: Print only those lines consisting of a complete HTML entity
- Formatting output with printf()
- Formatting output with width and precision specifiers
- Manipulating strings
- Using associative arrays
- Introducing AWK's math functions
- Using pipes
- Parsing Excel CSV files: Line endings and quoting
- Parsing Excel CSV files: Commas and new lines
- Scripting with AWK
- Challenge: Perform a join
- Solution: Perform a join
- Goodbye
Taught by
David D. Levine