I'm trying to add three hyphens to the first empty line of a given text file, and am trying to use
sed for this. My initial file (a MultiMarkdown file) looks something like this:
title: "Ch. 1: Unparticipated Causality" author: Jonathan Greig biblio-files: bibliography.bib biblio-style: chicago-authordate mainfont: Linux Libertine O linestretch: 1.5 documentclass: article geometry: margin=1in citecolor: black linkcolor: black ## Ch 1: Unparticipated Causality ##
linkcolor: black and
## Ch 1 ... ##, I'm trying to append a few dashes (
---). Not quite sure how to accomplish this---the following command hasn't given for me:
sed '/^$/a ---' Chapter1Rev4.md
Currently the result is "command a expects \ followed by text", and not sure how to add the backslash or how to escape the hyphens/dashes.