Skill 3 in course 1.1: Command-Line Foundations
Working with Text
Read, search, transform and edit text files, the way administrators do all day.
You will be able to
- Read files of any size without opening an editor, and follow a log as it grows.
- Search with grep and basic or extended regular expressions, including context, counts and inverted matches.
- Reshape text with cut, sort, uniq, tr, sed and awk.
- Create and edit configuration files confidently in vim, and in nano when you prefer.
Lessons
- 01Reading and counting textLook at files of any size, follow a growing log, and measure text before you change it.
catlessheadtailwcnl0/5 exercises - 02Searching with grep and regular expressionsFind the lines that matter in configuration files and logs, using patterns instead of exact words.
grepgrep -Egrep -igrep -vgrep -cgrep -r0/5 exercises - 03Reshaping text: cut, sort, uniq, tr, sed and awkSelect fields, order and count lines, substitute text and compute from columns, all from the command line.
cutsortuniqtrpastesed0/5 exercises - 04Creating and editing files with vimCreate and change configuration files in vim, the editor that is always installed, with nano as a fallback.
vimvinanovimtutor:wq:set number0/5 exercises