April 2018
Beginner
284 pages
7h 3m
English
If we need to search for one entry, then we need more than just one line. The entry is in three lines. So, if we search for the hammer, we need to go to the hammer line and the two lines that follow. We do this by using the -A option to grep, which is short for after. We need to display the matching line and two lines after. This will be expressed by the following code:
$ parsecsv.sh tool | grep -A2 hammer
This is displayed in the following screenshot:
