Append text after match
sed -i '/pattern/aAppended text' inputfile
Prepend text before match
sed -i '/pattern/iPrepended text' inputfile
Use \ to append/prepend multiple lines.
\