I have an HTML file. One line is the file is white space followed by this text:
<!-- insert new downloads here -->
How can I insert a line of text after that line in the file, just from the command line?
I did some sed research and this seems to work:
sed -i '' -e 's/<!-- insert new downloads here -->/<!-- insert new downloads here -->\
new content/' input.html
input.html-e
, which contains the old content, since the -i
option takes the backup file extension as an argument.
-i
option, that should work though, fixed in your answer.