appending with sed based on matched pattern

Hi,

I want to know if you can input with sed but instead of specifing a line number like below I wan't to be able to insert based on a specific word or patttern.

10i\
Insert me after line 10

is this possible with sed or should I use AWK?

Thanks

Jack

In sed any command that uses line numbers can be also used with search patterns.

I suggest you look in the frequently asked questions forum for sed information, or search the web for sed tutorials if this is not clear.

Hi,

thanks, I got it sorted.

/match/ { i\
insert after match
}