Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Exercise - simple grep

  • Implement a simple version of grep that receives a search-term and a file and shows the lines in the file that match.

  • Extend it to be able to work on more than one file.

  • Extend it to accept regex as the search-term

  • Extend it to accept an -r or --recursive flag and if given a folder then process each file recursively.