Practical Case Study 1: Chess Game Extractor
In this section, we will incrementally develop a shell script to perform a data processing task. We have done some data crunching in the previous chapters using pipelines in a limited fashion. Here, we will attempt a more complex task. Depending on your taste, there are a number of editors available to write a script with. You may be familiar with GUI editors such as SublimeText or Notepad++, but there are several editors that work in the console itself without a GUI. A few are complex and very powerful ones such as emacs or vim, and some are simple editors such as gedit and nano. One of these is usually available on most systems. The editor can be launched right from the command line without needing to navigate the GUI Desktop with the mouse or trackpad, by just typing its name like any other command.
Understanding the Problem
The functionality of this script that we want to develop is that it can take a text file containing thousands...