Track 03 of 12 · Work with real input
Finding & Transforming Data
Find files safely and reshape text or structured data with focused command-line tools. Learn where record boundaries, quoting, and format-aware parsing matter.
Ten concepts, in learning order
Each lesson assumes the ideas above it and prepares you for the ones below.
- 01Finding files with findfind traverses directory trees from explicit starting points and evaluates an expression of tests and actions for each encountered pathname.
- 02Building arguments with xargsxargs reads input records and constructs one or more command invocations whose argument lists contain those records, subject to parsing and size options.
- 03Null-delimited filenamesA null-delimited pathname stream terminates each pathname with a zero byte, the one byte that cannot occur inside a Unix pathname component.
- 04Command substitutionCommand substitution runs a nested command and replaces the substitution with its standard output after removing trailing newline characters.
- 05Shell parameter expansionParameter expansion replaces forms beginning with $ with a parameter's value or a transformation such as a default, required-value check, length, or pattern removal.
- 06Stream editing with sedsed applies an ordered editing program to a stream of input records, using addresses to select records and commands to transform or emit them.
- 07Field processing with awkawk processes input as records split into fields and runs pattern-action rules that can filter, calculate, aggregate, and format output.
- 08Character translation with trtr reads standard input and translates, deletes, or squeezes characters according to two character sets, then writes the result to standard output.
- 09Splitting output with teetee copies bytes from standard input to standard output and simultaneously writes copies to one or more files.
- 10JSON on the command line with jqjq parses JSON values and applies filters that select, construct, transform, or serialize structured results.
Continue the curriculum
Next: Shell Scripts & Job Control
Turn reliable commands into maintainable scripts and control long-running work from an interactive shell. Practice explicit arguments, failures, jobs, and cleanup.
Open track 4