Lessons
AWK · Easy
AWK · Easy. Ten lessons. Open-book quizzes. Lesson 1 free.
10 lessons · The Host · Lesson 1 free
Pass all ten lessons for the certificate. Sample · Claim

Lesson 1 · On the house
Multidimensional arrays and SUBSEP
Simulate matrices with a[i,j], understand SUBSEP, split compound keys, and walk rows and columns safely.

Lesson 2
Sorted traversal with asort and asorti
Sort array values with asort, sort keys with asorti, keep the original map, and print frequency tables in a stable order.

Lesson 3
Advanced regex: match, gensub and word boundaries
Capture groups with match's array, rewrite with gensub, use word-boundary anchors, and extract structured pieces from a line.

Lesson 4
Bit operations and switch statements
Mask and shift with and, or, xor, lshift and rshift, invert with compl, and branch with gawk's switch/case.

Lesson 5
Indirect function calls with @
Call a function by name with @fname(args), build dispatch tables, and choose handlers at run time.

Lesson 6
ARGV and ARGC: choosing files mid-run
Set ARGV and ARGC in BEGIN, skip a file by clearing ARGV[i], jump ahead with nextfile, and read a list of paths.

Lesson 7
ENVIRON and PROCINFO
Read environment variables with ENVIRON, inspect gawk state through PROCINFO, and branch on version or FS mode.

Lesson 8
FPAT and FIELDWIDTHS for structured fields
Parse CSV-ish lines with FPAT, read fixed-width records with FIELDWIDTHS, and know which mode PROCINFO reports.

Lesson 9
Two-way pipes and getline from commands
Feed a command with |&, read its output back, close each direction, and fall back to ordinary command getline.

Lesson 10
Utility: sorted frequency report
Build a reusable word-frequency tool with FPAT-free splitting, asorti, ARGV sample input, and aligned printf output.
Sample certificate
Certificate of completion
Sign in to claim your certificate of completion.
Certificate
Finish all ten lessons, then sign in
Pass every lesson on this device (quizzes and checks). Then sign in or create an account to type your name and download the JPG.