I was wondering what the best way to get everything after the second occurrence of a string would be. I have files like this:
---
title: Test Document
creation_date: 01-29-2016
---
Text, blah blah blah
More text, blah blah blah
So I have file which contains 'frontmatter' between two ---
s. I would like to return everything after the second ---
, preferably using a bash command of some sort. When thinking about this, sed and awk came to mind, but I don't really know which one would be better for the job.
An important part of this is that there can be any arbitrary amount of key-value pairs in the frontmatter, so just cutting the first four lines is not a valid approach here.