Search⌘ K

Finding plays/poems by each author (sed, sort, uniq, head)

Explore how to analyze Shakespearean-era plays and poems by extracting author names using Bash commands such as sed, sort, uniq, and head. Learn to combine these tools effectively to count unique works per author and manage textual data efficiently.

We'll cover the following...

Well, so far we do not know how many authors are there in the dataset and also their name’s spellings. Therefore, it is not feasible to insert each authors names in the command shown above. We need to do a smarter, but slightly complicated approach!

  • Step 1: Convert the first line into a column, $head -n 1 plays_and_poems_stat.csv |
...