I have a list:
### To Read:
One Hundred Years of Solitude | Gabriel García Márquez
Moby-Dick | Herman Melville
Frankenstein | Mary Shelley
On the Road | Jack Kerouac
Eyeless in Gaza | Aldous Huxley
### Read:
The Name of the Wind (The Kingkiller Chronicles: Day One) | Patrick Rothfuss | 6-27-2013
The Wise Man’s Fear (The Kingkiller Chronicles: Day Two) | Patrick Rothfuss | 8-4-2013
Vampires in the Lemon Grove | Karen Russell | 12-25-2013
Brave New World | Aldous Huxley | 2-2014
I'd like to use something like python's string.split(' | ')
to separate the various fields into separate strings, but since the two sections have different numbers of fields, I think I need to treat them differently. How do I go about selecting the lines in between '### To Read:' and '### Read:' and after '### Read:' and splitting them? Should I use awk or sed?