I have files like:
text2insert filewithpattern
and also known:
pattern
How
sed -e '/pattern/r text2insert' filewithpattern