Counting the Plays and Poems (head, sed, grep, wc)

If we want to find there are how many plays or poems in the dataset, the first thing we need to do is - take out the first line of the file using head and then replace all the commas (,) with newline (\n) characters. We do the replacement using a regular expression (\'$'\n) inside sed tool. Let’s first watch the following video lecture:

Get hands-on with 1200+ tech skills courses.