file contents:
# cat file.txt
-----
MATCH
-----
MATCH
-----
MATCH
-----
# cat text.txt
add this text file
before first match
sed commands:
# sed '0,/MATCH/r text.txt' file.txt
-----
add this text file
before first match
MATCH
add this text file
before first match
-----
MATCH
-----
MATCH
-----
# sed '0,/MATCH/i prependme once' file.txt
prependme once
-----
prependme once
MATCH
-----
MATCH
-----
MATCH
-----
I'm trying to merge these commands somehow to get the following output:
-----
add this text file
before first match
MATCH
-----
MATCH
-----
MATCH
-----