Table of Contents

AWK cheatsheet

Ever since I started using awk in vcs I've been finding about its power but I'm unable to remember its syntax so here's a series of notes.

General notes:

Books:

Command-equivalents

Text replacements

sub() and gsub(). Either strings or regexs can be used

$ echo hello world | awk 'sub("hello", "bye")'
> bye world