Sculpting text with regex, grep, sed and awk
Feb 14, 2012
In this article, I’ll provide a functional introduction to four important concepts and tools for sculpting text: regex, grep, sed and awk.
- regex is a language for describing patterns in strings;
- grep filters its input against a pattern;
- sed applies transformation rules to each line; and
- awk manipulates an ad hoc database stored as text, e.g. CSV files.