If you have ever been interested in awk and sed Unix commands, then you probably know about the awk1line.txt and sed1line.txt files that are floating around the Internet. Each file contains around 80 idiomatic sed and awk one-liners for performing various text modification tasks.
Peteris Krumin wrote some articles explaining every one-liner in the two files, and these articles are absolutely worth a comprehensive read. It took Peteris some months to finish the explaination, thanks a lot to his dedicated work!
The Awk One-Liners Explained article
- Part One: File spacing, Numbering and calculations
- Part Two: Text conversion and substitution
- Part Three: Selective printing or deleting of certain lines
- Part Four: String creation, array creation and update on selective printing of certain lines
The Sed One-Liners Explained article
- Part One: File spacing, Numbering and Text conversion and substitution
- Part Two: Selective printing of certain lines
- Part Three: Selective deletion of certain lines and Special applications